Question? + rep
#7

If you're using ZCMD, just set a variable on a command and then use OnPlayerCommandReceived to check if the variable is set and then deny the command. Here is an example:

pawn Код:
new notele[MAX_PLAYERS char];
CMD:dmarea(playerid, params[])
{
    //.......
    notele{playerid} = 1;
    return 1;
}

public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(notele{playerid} == 1)
    {
        SendClientMessage(playerid, -1, "You cannot teleport because you're in a DM");
        return 0;
    }
    return 1;
}
Then just set notele to 0 once they leave the DM.
Reply


Messages In This Thread
Question? + rep - by jaami - 11.04.2012, 06:22
Re: Question? + rep - by jaami - 11.04.2012, 06:45
Re: Question? + rep - by jaami - 13.04.2012, 07:40
Re: Question? + rep - by Unknownich - 13.04.2012, 07:45
Re: Question? + rep - by RollTi - 13.04.2012, 07:49
Re: Question? + rep - by jaami - 14.04.2012, 05:42
Re: Question? + rep - by [HiC]TheKiller - 14.04.2012, 05:52
Re: Question? + rep - by jaami - 15.04.2012, 06:05
Re: Question? + rep - by RollTi - 15.04.2012, 06:08

Forum Jump:


Users browsing this thread: 1 Guest(s)