08.02.2018, 07:05
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;
}


