30.11.2014, 15:51
That's a global variable. According to Wikipedia,
A variable is something holding data.
The [new] is a keyword telling the compiler that the code following it is a definition. The "MAX_PLAYERS" tells the compiler how many cells the variable should be made of. By default it would be
new anythingshere[500];
You can then use it like so:
By default, g_IsAdmin would be "0".
Quote:
|
Originally Posted by wikipedia
In computer programming, a global variable is a variable with global scope, meaning that it is visible (hence accessible) throughout the program, unless shadowed. The set of all global variables is known as the global environment or global state.
|
The [new] is a keyword telling the compiler that the code following it is a definition. The "MAX_PLAYERS" tells the compiler how many cells the variable should be made of. By default it would be
new anythingshere[500];
You can then use it like so:
pawn Код:
new g_IsAdmin[MAX_PLAYERS];
CMD:makeadmin(playerid, params[])
{
g_IsAdmin[playerid] = 1;
return 1;
}

