29.11.2011, 15:43
Thanks for all the replies guys but my problem still exists using the code below.
I just need to stop the default text from displaying when a player is muted, it works fine until 'Muted' is set to '1'. After that it allows the chat messages to carry on displaying.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(Muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You are currently muted and cannot type in the chatbox.");
new string[128], playername[MAX_PLAYER_NAME];
new PlayerColor = GetPlayerColor(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s[%d]: {FFFFFF}%s", playername, playerid, text);
SendClientMessageToAll(PlayerColor, string);
return 0;
}