Raised This Month: $ Target: $400
 0% 

[HELP] How to set a time interval


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wAyz
Senior Member
Join Date: Feb 2010
Location: Germany
Old 11-17-2013 , 02:37   [HELP] How to set a time interval
Reply With Quote #1

Hello,

This morning I've quickly created a little plugin:

Code:
#include <amxmodx>
#include <engine>

public plugin_init()
{
    register_plugin("Chat-Abuse Punisher","0.01","wayz")
    
    register_clcmd("say", "CmdSpam")
}

public CmdSpam(id)
{
    new said[192]
    read_args(said,192)
    new name[32]
    get_user_name(id, name, 31)
    
    if( ( containi(said, "TEST") != -1 ) )
    {
        server_cmd("amx_ban %s 5 Spam", name)
    }
}
Now I would like to set a time interval for let's say 5 minutes, basically if you say "TEST"
more than one time in those 5 minutes, you will get banned. Unfortunately, I didn't find a method to create this yet.

Last edited by wAyz; 11-17-2013 at 03:00.
wAyz is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode