14.05.2016, 11:00
You can also store 32 true/false values in a single variable if you really want to save memory. By using bit flags.
EDIT: Sorry didn't realize that link had already been posted.
Код:
enum PLAYER_FLAGS :(<<= 1) { LOGGED_IN = 1, IN_RACE }; new PLAYER_FLAGS: PlayerFlags[MAX_PLAYERS]; //when player logs in... PlayerFlags[playerid] |= LOGGED_IN; //when player logs out PlayerFlags[playerid] &= ~LOGGED_IN; //check if player is logged in. if( PlayerFlags[playerid] & LOGGED_IN )