[Help]Anti Spam,timers,etc.
#1

I made Anti Spam for my server in public OnPlayerText and it's work but if player do spam,server warn him.I want to make a timer when he makes a spam,timer stop him writting for 60 seconds,how I make this?
Reply
#2

Explanation inside.
pawn Код:
public OnPlayerText(playerid, text[])
{
    new StartTextTick;

    if(gettime() - StartTextTick > 1) //if the StartTextTick is more than 60 seconds it will show him the message.
        return SendClientMessage(playerid, -1, "Please wait 60 seconds to send a text again, thank you!");

    StartTextTick = gettime()+60; //get the current time + 60 seconds
    return true; //return false if you have your style of sending the message.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)