OnPlayerCommandReceived
#7

Код:
public OnPlayerCommandRecieved(playerid, cmdtext[])
{
    if(Info[playerid][Jailed]==1)
    {
        if(!strcmp(cmdtext,"/pm") || !strcmp(cmdtext,"/a")) return 1;

        SendClientMessage(playerid,COLOR_RED,"ERROR, You are in jail.");
        return 0;
    }
    return 1;
}
This code simply dissables all commands except /pm and /a which would bypass the check and work from the main source of the cmd. You dont need to re write the cmd in this callback.
I dont think so you require anything else than this. sscanf dont work as string matching or maybe y_stringhash. Sscanf is just opposite of format.
Reply


Messages In This Thread
OnPlayerCommandReceived - by ajwar - 09.03.2015, 11:10
Re: OnPlayerCommandReceived - by CalvinC - 09.03.2015, 11:12
AW: OnPlayerCommandReceived - by Kaliber - 09.03.2015, 11:15
Re: OnPlayerCommandReceived - by ajwar - 09.03.2015, 11:17
Re: AW: OnPlayerCommandReceived - by ajwar - 09.03.2015, 11:20
AW: Re: AW: OnPlayerCommandReceived - by Kaliber - 09.03.2015, 11:22
Re: AW: OnPlayerCommandReceived - by Gammix - 09.03.2015, 11:50
AW: Re: AW: OnPlayerCommandReceived - by Kaliber - 09.03.2015, 12:35
Re: OnPlayerCommandReceived - by ReshiramZekrom - 09.03.2015, 13:46
AW: Re: OnPlayerCommandReceived - by Kaliber - 09.03.2015, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)