Trying to stop commands being performed when dead. (not working).
#1

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)