25.01.2019, 23:03
I'm using I-ZCMD and wanted to disable all commands if a player is not logged or spawn, problem is, they can use commands even if they're not logged/spawned:
Bools are set to false on OnPlayerConnect.
pawn Код:
public OnPlayerCommandRecieved(playerid, cmdtext[])
{
if(Player[playerid][IsLoggedIn] == false) return GameTextForPlayer(playerid, "~w~You need to be ~r~logged in ~w~to use commands!", 3000, 4), 0;
if(Player[playerid][PlayerSpawned] == false) return GameTextForPlayer(playerid, "~w~You must be ~r~alive ~w~to use commands!", 3000, 4), 0;
return 1;
}