SA-MP Forums Archive
Chat use - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Chat use (/showthread.php?tid=601968)



Chat use - Deny1 - 29.02.2016

How to make to player can use chat only every 5 seconds


Re: Chat use - GuyYahood1 - 29.02.2016

PHP код:
new antispam[MAX_PLAYERS];
//OnPlayerConnect
antispam[playerid] = GetTickCount();
//OnPlayerText
if(GetTickCount() - antispam[playerid] < 5000)return SendClientMessage(playerid,-1,"You spam!"),0;
antispam[playerid] = GetTickCount(); 
That's it


Re: Chat use - Deny1 - 29.02.2016

thanks + rep