[Qestions]
#2

That's a global variable. According to Wikipedia,
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.
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:
pawn Код:
new g_IsAdmin[MAX_PLAYERS];

CMD:makeadmin(playerid, params[])
{
     g_IsAdmin[playerid] = 1;
     return 1;
}
By default, g_IsAdmin would be "0".
Reply


Messages In This Thread
[Qestions] - by astanalol00 - 30.11.2014, 15:48
Re: [Qestions] - by Abagail - 30.11.2014, 15:51
Re: [Qestions] - by AnthonyTimmers - 30.11.2014, 15:57
Re: [Qestions] - by astanalol00 - 30.11.2014, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)