08.02.2018, 10:14
Well, you had already put return 0 for the mute. (Yes you was missing one return 0 too)
Your code is correct but the order is incorrect. You send the message and after you check if the player is mute.
Your code is correct but the order is incorrect. You send the message and after you check if the player is mute.
PHP код:
public OnPlayerText(playerid, text[])
{
if(connected[playerid] == true)
{
SendClientMessage(playerid, -1 , "{c3c3c3}» You can't talk, you need to spawn first...");
return 0;
}
if(Mute[playerid] == 1) // If the player is mute, we don't format the message and return 0
{
SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You're muted therefore you can't type anything.");
return 0;
}
// Chat showing the id of the player
new pText[144];
format(pText, sizeof (pText), "{c3c3c3}[%d] {FFFFFF}%s", playerid, text);
SendPlayerMessageToAll(playerid, pText);
return 0;
}