Disabling the OnPlayerText Through Include?
#4

pawn Код:
new badwords[][] =
{
    "Bitch",
    "Whore",
    "Fuck"
};
public OnPlayerText(playerid, text[])
{
   
    for (new loop; loop < sizeof(badwords); loop ++)
    {
        new sfind = strfind(text, badwords[loop], true);
        if(sfind == -1) continue;
        while(text[sfind ] != 0 || text[sfind ] != ' ') text[sfind] = '*';
    }
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(GetPVarInt(playerid, "Muted") == 1)
    {
        SendClientMessage(playerid,COLOR_RED, "You cant talk while on Class Selection");
        return 0;
    }
    else if(GetPVarInt(playerid, "Muted") == 0)
    {
        format(text, 1024, "%s: {FFFFFF}[%d] {FFFFFF}%s", PlayerName, playerid, text);
        SendClientMessageToAll(GetPlayerColor(playerid), text);
        return 0;
    }
    return 1;
}
Was a rough idea that I just put together .
Reply


Messages In This Thread
Disabling the OnPlayerText Through Include? - by ScriptJorkis - 12.01.2012, 09:05
Re: Disabling the OnPlayerText Through Include? - by Mikkel_Pedersen - 12.01.2012, 09:27
Re: Disabling the OnPlayerText Through Include? - by ScriptJorkis - 12.01.2012, 09:33
Re: Disabling the OnPlayerText Through Include? - by [HiC]TheKiller - 12.01.2012, 10:19
Re: Disabling the OnPlayerText Through Include? - by ScriptJorkis - 12.01.2012, 10:22
Re: Disabling the OnPlayerText Through Include? - by Face9000 - 12.01.2012, 10:46

Forum Jump:


Users browsing this thread: 2 Guest(s)