OnPlayerCommandPerformed
#1

I added check if the player is muted but it sends the message and still shows the command action.

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(PlayerInfo[playerid][pMuted] == 1)
	{
		SCM(playerid, COLOR_RED, "You cannot speak, you have been silenced");
		return 0;
	}
    if(!success)
    {
        new string[256];
        format(string, sizeof(string), "Error: {FFFFFF}The command '%s' was not recognised, please type /help.", cmdtext);
        SCM(playerid,COLOR_RED, string);
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerCommandPerformed - by PaulDinam - 19.10.2012, 14:17
Re: OnPlayerCommandPerformed - by Roel - 19.10.2012, 14:38
Re: OnPlayerCommandPerformed - by PaulDinam - 19.10.2012, 14:47
Re: OnPlayerCommandPerformed - by PaulDinam - 19.10.2012, 14:49
Re: OnPlayerCommandPerformed - by Roel - 19.10.2012, 14:50
Re: OnPlayerCommandPerformed - by Djole1337 - 19.10.2012, 14:50
Re: OnPlayerCommandPerformed - by Roel - 19.10.2012, 14:52
Re: OnPlayerCommandPerformed - by PaulDinam - 19.10.2012, 14:52
Re: OnPlayerCommandPerformed - by Djole1337 - 19.10.2012, 14:53

Forum Jump:


Users browsing this thread: 3 Guest(s)