Raised This Month: $ Target: $400
 0% 

Delay between buttons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yan1255
Senior Member
Join Date: Jul 2011
Old 08-15-2013 , 01:25   Delay between buttons
Reply With Quote #1

New Question:

Here I am trying to create a delay between using buttons..
now the trace attack seems to skip right to the client_print
and the ham_use seems to just do nothing... it normal...
PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

new Float:fBug33 ];

public 
plugin_init()
{
    
RegisterHamHam_Use"func_button""FwdTraceButtonUse" );
    
    
RegisterHamHam_TraceAttack"func_button""FwdTraceButtonAttack" );
}

public 
client_putinserverclient )
{
    
fBugclient ] = get_gametime();
}

public 
FwdTraceButtonAttackentattacker )
{
    if ( 
fBugattacker ] + 1.5 get_gametime() )
    {
        
dllfuncDLLFunc_Useentattacker );
        
        
fBugattacker ] = get_gametime();
        
        return 
1;
    }
    
    
client_printattackerprint_center"You need to wait at least 1.5 Seconds between using buttons." );
    
    return 
1;
}

public 
FwdTraceButtonUseclient )
{
    if ( 
fBugclient ] + 1.5 get_gametime() )
    {
        
fBugclient ] = get_gametime();
    
        
client_printclientprint_center"You need to wait at least 1.5 Seconds between using buttons." );
        
        return 
1;
    }
    
    return 
4;

__________________

Last edited by yan1255; 08-15-2013 at 02:07.
yan1255 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 15:48.


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