SA-MP Forums Archive
Mute (OnPlayerText Problem) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mute (OnPlayerText Problem) (/showthread.php?tid=250854)



Mute (OnPlayerText Problem) - dr.pepper - 24.04.2011

- Removed.


Re: Mute (OnPlayerText Problem) - iggy1 - 24.04.2011

pawn Код:
public OnPlayerText(playerid, text[])
{
    if (tInfo[playerid][Muted])
    {
        SendErrMsg(playerid, "You cannot chat while you are muted!");
        return 0;
    }
    tInfo[playerid][ChatLines]++;
    new name[MAX_PLAYER_NAME], ircMsg[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
    format(text, 1024, "%s(%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), text);
    return 0;
}
Do the mute check before anything else.


Re: Mute (OnPlayerText Problem) - dr.pepper - 24.04.2011

- Removed.