Raised This Month: $32 Target: $400
 8% 

How long a button has been held?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 06-26-2008 , 16:33   How long a button has been held?
Reply With Quote #1

I'm trying to fire an event when the Attack button is held down for 4 seconds.
How can I do this?
Code:
client_PreThink(id) {     if(!is_user_alive(id))         return PLUGIN_HANDLED         if(pev(id,pev_button) & IN_ATTACK))     {               RunEvent(); // I want this called 4 seconds after holding the attack button.     } }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 


Thread Tools
Display Modes

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:16.


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