06.01.2014, 14:53
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?
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.
}