OnPlayerText mute.
#1

I've made my own simple mute system but I can't figure out why does the player can still send a message (along with the custom message, while muted)

Код:
public OnPlayerText(playerid, text[])
{
	if(connected[playerid] == true){
    SendClientMessage(playerid, -1 , "{c3c3c3}» You can't talk, you need to spawn first...");
    }
    else
    {
	// Chat showing the id of the player
	    new pText[144];
	    format(pText, sizeof (pText), "{c3c3c3}[%d] {FFFFFF}%s", playerid, text);
	    SendPlayerMessageToAll(playerid, pText);
	    if(Mute[playerid] == 1)
	    {
			SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You're muted therefore you can't type anything.");
			return 0;
		}
	}
    return 1;
}
Reply


Messages In This Thread
OnPlayerText mute. - by ivndosos - 08.02.2018, 07:05
Re: OnPlayerText mute. - by aoky - 08.02.2018, 07:27
Re: OnPlayerText mute. - by ivndosos - 08.02.2018, 07:45
Re: OnPlayerText mute. - by ivndosos - 08.02.2018, 08:53
Re: OnPlayerText mute. - by Dayrion - 08.02.2018, 10:14

Forum Jump:


Users browsing this thread: 3 Guest(s)