Anti spam command.
#1

How to make anti spam command using y_commands include?


I USED SEARCH BUTTON!!!
Reply
#2

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;
} 
Reply
#3

@JuanStone i think this is for zcmd only :/?
Reply
#4

Works for zcmd and y_commands.
Reply


Forum Jump:


Users browsing this thread: