21.12.2009, 23:04
Quote:
Originally Posted by WThieves
Hi everyone , Sorry to bother you again but this time yet i have another request!
I was making a piece of script for my GM. It works good except for a few pieces.... i have this: Quote:
1: Now my request, if an admin uses this command it can repeadly use it and it wil be invurnable for ever, as i don't want this, i would like to have a timer that makes it so that you can use this command again only after 120 seconds! I've tried this on my own but i cant do it and i also searched the forum but with no results i can use If someone could write this i would appreciate it! 2: If an admin uses this command, i would like it if every player an a range of 50 could freeze for like 10 seconds. Well i tried that too but id didnt work either So if someone could help me out here i'd be happy to see ;P PS: if the freezing could be an explosion too, that could blow everyone away in a range of 50, sort of protection :P |
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 !"); }