Raised This Month: $ Target: $400
 0% 

Button only pressed once


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 08-06-2013 , 02:28   Button only pressed once
Reply With Quote #1

How to detect if user press a button only once? I don't want fakemeta's way because when I pressed it, it detect many times. I use this with fakemeta:
PHP Code:
public pforward(id)
{
    static 
ButtonOldButton;
    
    
Button pevidpev_button )
    
OldButton pevidpev_oldbuttons )
    
    if (!(
Button IN_RELOAD) || !(Button IN_USE) || !(Button IN_ATTACK) || !(Button IN_ATTACK2))
    {
        if (
Button IN_FORWARD)
        {
            if (
g_running == 0)
            {
                
client_cmd(id"+fastrun")
                
client_printidprint_center"RUN" )
            }
            
g_running 1
        
}
        else if ((
OldButton IN_FORWARD) && !(Button IN_FORWARD))
        {
            if (
g_running == 1)
            {
                
client_cmd(id"-fastrun")
                
client_printidprint_center"STOP")
            }
            
g_running 0
        
}
    }

Randomize 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