30.09.2011, 08:37
An enum is practicly a couple variables, which is stored in one variable.
Now we got an enum but its unused. So lets use it.
Now this variable holds 'MAX_PLAYERS', and 'pInfo'. MAX_PLAYERS is to bind the variable to an player, and the 'pInfo' holds the variables which are stored in the enum.
If you want to use the variables, you can do it like this:
Those are just examples ofcourse, fit it to your needs, and if you dont get something just post again and im sure there will be someone to reply!
pawn Код:
enum pInfo {
// everything you want to save goes down here Ex:
Money,
Admin
}
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
If you want to use the variables, you can do it like this:
pawn Код:
PlayerInfo[playerid][Admin] = 1;
if( PlayerInfo[playerid][Admin] == 1 )
PlayerInfo[playerid][Money] = 1;
if( PlayerInfo[playerid][Money] == 1 )