Anti spam command. - 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: Anti spam command. (
/showthread.php?tid=567427)
Anti spam command. -
ilepopivanov - 13.03.2015
How to make anti spam command using y_commands include?
I USED SEARCH BUTTON!!!
Respuesta: Anti spam command. -
JuanStone - 13.03.2015
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
SetPVarInt(playerid, "anticmdflood", GetTickCount());
return true;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(GetTickCount()-GetPVarInt(playerid, "anticmdflood") < 1000*5)
{
SendClientMessage(playerid, -1, "You must wait 5 seconds to return to using a command.");
return true;
}
return true;
}
Re: Respuesta: Anti spam command. -
ilepopivanov - 13.03.2015
@JuanStone i think this is for zcmd only :/?
Respuesta: Anti spam command. -
JuanStone - 13.03.2015
Works for zcmd and y_commands.