17.01.2016, 10:36
your enum shall now become :
enum unameit
{
pAdmin,
...
bool: pGodMode
}
enum unameit
{
pAdmin,
...
bool: pGodMode
}
Код:
CMD:god(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 3) { if (PlayerInfo[playerid][pGodMode]== false) { SetPlayerHealth(playerid, 0x7FFFFFFF); SendClientMessage(playerid, COLOR_GREEN, "GodMode ON!"); PlayerInfo[playerid][pGodMode]= true; } else if(PlayerInfo[playerid][pGodMode]== true) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, COLOR_RED, "GodMode OFF!"); PlayerInfo[playerid][pGodMode]= false; } } else return SendClientMessage(playerid, COLOR_WHITE, "you are not authorised to use that Command"); return 1; }