Trying to stop commands being performed when dead. (not working). - 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)
+--- Thread: Trying to stop commands being performed when dead. (not working). (
/showthread.php?tid=507099)
Trying to stop commands being performed when dead. (not working). -
Dokins - 15.04.2014
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if((strcmp(cmdtext, "do", true) != 0) && (strcmp(cmdtext, "report", true) != 0))
{
if(PlayerDead[playerid] == 1)
{
SendClientMessage(playerid, COLOUR_GREY, "You cannot use this as you are dead.");
return 0;
}
}
I can't seem to get this working at all! Still works for every command. I'm trying to allow the player to use /do and /report!
I've never used this before, can anyone advise?