OnPlayerText
#2

Make a new variable "new AntiSpamChat[MAX_PLAYERS];", Whenever someone says something, increase that value using "AntiSpamChat[playerid]+1;", Add a check if he has said something in that time.

Add a timer that resets every X seconds (e.g. 5 messages per 5 seconds) and if the messages are above 5 simply return 0 and send the player a client message to stop spamming.
Reply


Messages In This Thread
OnPlayerText - by Crazyboobs - 05.06.2012, 21:50
Re: OnPlayerText - by Revo - 05.06.2012, 21:53
Re: OnPlayerText - by Crazyboobs - 05.06.2012, 21:58
Re: OnPlayerText - by MP2 - 05.06.2012, 23:10
Re: OnPlayerText - by Jefff - 05.06.2012, 23:12
Re: OnPlayerText - by Crazyboobs - 06.06.2012, 06:20
Re: OnPlayerText - by Crazyboobs - 06.06.2012, 16:46
Re: OnPlayerText - by MadeMan - 06.06.2012, 17:11
Re: OnPlayerText - by Crazyboobs - 06.06.2012, 20:16
Re: OnPlayerText - by skullmuncher1337 - 06.06.2012, 20:20

Forum Jump:


Users browsing this thread: 1 Guest(s)