I'll need some help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I'll need some help (
/showthread.php?tid=97472)
I'll need some help -
Goobiiify - 14.09.2009
Hello, I have seen a bug on my server and it's really abrasive one. The bugg is that you can do /kill when ever you want even when you are /freeze'ed with a admin command. So I'll need some help to make a solution on this problem, Thanks!
Re: I'll need some help -
Clavius - 14.09.2009
You will need a variable to store if each player is frozen or not, like:
pawn Код:
new bool:Frozen[MAX_PLAYERS];
[...]
OnPlayerConnect(playerid)
Frozen[playerid] = false;
Freeze command:
Frozen[playerid] = true;
Unfreeze command:
Frozen[playerid] = false;
Now add this check to /kill or whatever else:
if (Frozen[playerid] == true) return SendClientMessage(playerid, WHATEVER_COLOR, "[FAIL] You are frozen, no suicide for ya!");