[Tutorial] Adding quick anti-spam timers
#12

Quote:
Originally Posted by sciman001
Посмотреть сообщение
heres a better version. i will maybe edit it later to make it use a variable instead of pvars.

pawn Код:
public OnPlayerText(playerid, text[])
{
    if((GetTickCount() - GetPVarInt(playerid, "AntiSpam")) > 1000)
    {
        new string[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s (%i): %s", name, playerid, text);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
        SetPVarInt(playerid, "AntiSpam", GetTickCount());
    }
    else
    {
        SendClientMessage(playerid, 0xFF000FF, "You must wait atleast 1 second before using the chat again.");
    }
    return 0;
}
Sendclientmessagetoall(Getplayercolor...

How do i use it in tdm where i don't want the player text to be in color of player ?
Reply


Messages In This Thread
Adding quick anti-spam timers - by Antonio [G-RP] - 31.03.2011, 02:57
Re: Adding quick anti-spam timers - by BASITJALIL - 31.03.2011, 03:03
Re: Adding quick anti-spam timers - by Antonio [G-RP] - 31.03.2011, 04:14
Re: Adding quick anti-spam timers - by -Rebel Son- - 31.03.2011, 06:10
Re: Adding quick anti-spam timers - by Medal Of Honor team - 31.03.2011, 07:44
Re: Adding quick anti-spam timers - by Scratch - 31.03.2011, 18:09
Re: Adding quick anti-spam timers - by Vince - 31.03.2011, 18:31
Re: Adding quick anti-spam timers - by Antonio [G-RP] - 31.03.2011, 20:12
Re: Adding quick anti-spam timers - by -Rebel Son- - 01.04.2011, 18:54
Re: Adding quick anti-spam timers - by sciman001 - 02.04.2011, 01:12
Re: Adding quick anti-spam timers - by Venice - 03.04.2011, 22:54
Re: Adding quick anti-spam timers - by Champ - 21.08.2012, 14:32

Forum Jump:


Users browsing this thread: 3 Guest(s)