28.10.2018, 14:27
The command was edited. An invalid player ID (65535) cannot pass the `IsPlayerConnected` check so it would never access the array.
Avoid using global variables that may be used inside functions (which are called from these commands) and you get unexpected results.
The logic is retrieving the player, checking if the player is connected, access arrays.
where ... are your messages.
Avoid using global variables that may be used inside functions (which are called from these commands) and you get unexpected results.
The logic is retrieving the player, checking if the player is connected, access arrays.
pawn Код:
new id, AdminLevel;
if(sscanf(params, "ui", id, AdminLevel)) return ...
if(!IsPlayerConnected(id)) return ...
if(AdminLevel < 1 || AdminLevel > 4) return ...
...
PlayerInfo[id][pAdmin] = AdminLevel;