21.12.2009, 23:54
Quote:
Originally Posted by kamilbam
Quote:
something like this on top of your script: Код:
forward Stopgod( ); Код:
public Stopgod( ) { for(new playerid, gmax = GetMaxPlayers(); playerid < gmax; playerid++) { SetPlayerHealth(playerid, 100); god[playerid] = 0; } } Edit: On top of script Код:
new god[MAX_PLAYERS]; Код:
if (strcmp(cmd, "/Udst!2", true) ==0 ) { if(PlayerInfo[playerid][pAdmin] >= 1337) if(god[playerid] == 0); { god[playerid] = 1; SetPlayerHealth(playerid,100000000); if(IsPlayerInAnyVehicle(playerid)) SetVehicleHealth(GetPlayerVehicleID(playerid),1000000000); SendClientMessage(playerid, COLOR_YELLOW, "You are in godmode for 60 seconds!"); SetTimer("Stopgod", 60000, 0); } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command or you have to wait 60 seconds !"); } |