View Single Post
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