16.02.2019, 12:32
The code provided by @MSC won't work properly, as if you change the variable's value, it will be given to the whole server's players. As they are not per-player variables. Plus could easily avoid one variable per job, and declare an array.
Код:
enum { Farmer, Lumberjack, Miner, Unemployed }; new PlayerJob[MAX_PLAYERS]; public OnPlayerConnect(playerid) { switch(PlayerJob[playerid]) { case Farmer: SetPlayerColor(playerid, -1); case Lumberjack: SetPlayerColor(playerid, -1); case Miner: SetPlayerColor(playerid, -1); case Unemployed: SetPlayerColor(playerid, -1); } return 1; }