survive-time
Join our discord server
Survive-Time Discord Server <- click
Installation
Simply install to your project:
mkdir project && cd project
git clone https://github.com/emmett-white/survive-time
cd survive-time
sampctl p ensure && sampctl p build
Contributing & Style Guide
// Constants and macros in uppercase, with underscores separating words.
// eg.
#define MAX_REASON_TEXT 64
const MAX_PLAYERS = 10;
// Variables
// Globals `static` as much as possible to prevent complex inter-module dependencies.
// eg.
static var1; // invalid
static var1,
var2; // invalid
static
var1,
var2; // valid
// Brace style
// Allman
// eg.
Func_Name(const playerid, ...)
{
if (...) {
return ...;
}
if (...) {
// code
return ...;
}
return 1;
}
// Function names
// Functions and callbacks in CamelCase
// eg.
Player_GetLevel(const playerid)
{
return char_score[playerid];
}
forward OnAccountRegistered(const playerid);
public OnAccountRegistered(const playerid)
{
account_id[playerid] = cache_insert_id();
return 1;
}