Raised This Month: $ Target: $400
 0% 

Help attack delay


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
anderpp
Junior Member
Join Date: Feb 2018
Old 03-19-2018 , 11:51   Help attack delay
Reply With Quote #1

It is a specific mod

I need help for complete this structure

A example:
PHP Code:
#include <amxmodx>
#include <engine>

#define PLUGIN "Prevent attack delay"
#define VERSION "1.0"
#define AUTHOR "author"

//time delay expressed in seconds 0.03
#define DELAY 0.03


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
}

public 
client_PreThink(id)
{
    if (
get_user_weapon(id) == CSW_KNIFE)
    {    
        if(
get_user_button(id) & IN_ATTACK)
        {
            if (
attack_clicks? < DELAY)
            {
                
client_print(idprint_chat"OMG U Are Robot auto clicker?");
                return 
PLUGIN_HANDLED
            
}
            else if (
attack_clicks? > DELAY) {
                
client_print(idprint_chat"Ok possible Human accept clicker faster");
                return 
PLUGIN_CONTINUE
            
}
            else if (
attack_clicks? && attack_held_down?) {
                
client_print(idprint_chat"Possible human held down attack!");
                return 
PLUGIN_CONTINUE
            
}
        }
    }
    return 
PLUGIN_CONTINUE

anderpp 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 18:10.


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