OnPlayerText
#5

Why would you need another if/else ?
lol....
if(Muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You are currently muted and cannot type in the chatbox.");

EDIT


Quote:
Originally Posted by Kingunit
Посмотреть сообщение
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;
}
Is enough.
IS RIGHT
Reply


Messages In This Thread
OnPlayerText - by Infamous - 29.11.2011, 15:18
Re: OnPlayerText - by Kostas' - 29.11.2011, 15:24
Re: OnPlayerText - by wumpyc - 29.11.2011, 15:25
Re: OnPlayerText - by Kingunit - 29.11.2011, 15:25
Re: OnPlayerText - by ElkaBlazer - 29.11.2011, 15:25
Re: OnPlayerText - by Kostas' - 29.11.2011, 15:28
Re: OnPlayerText - by Infamous - 29.11.2011, 15:43
Re: OnPlayerText - by Vince - 29.11.2011, 16:04
Re: OnPlayerText - by Infamous - 29.11.2011, 16:27

Forum Jump:


Users browsing this thread: 2 Guest(s)