AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hold Button (https://forums.alliedmods.net/showthread.php?t=186921)

JoKeR LauGh 06-06-2012 02:52

Hold Button
 
Hello.

I was thinking is there a way when a player hold a button and do an action. But, how to detect if the player is holding or pressing the button for x second?

Thanks.

<VeCo> 06-06-2012 07:46

Re: Hold Button
 
What button?

jimaway 06-06-2012 08:04

Re: Hold Button
 
possible with buttons that have these functions:

Code:

Button Constants
#define IN_ATTACK                (1<<0)
#define IN_JUMP                        (1<<1)
#define IN_DUCK                        (1<<2)
#define IN_FORWARD                (1<<3)
#define IN_BACK                        (1<<4)
#define IN_USE                        (1<<5)
#define IN_CANCEL                (1<<6)
#define IN_LEFT                        (1<<7)
#define IN_RIGHT                (1<<8)
#define IN_MOVELEFT                (1<<9)
#define IN_MOVERIGHT                (1<<10)
#define IN_ATTACK2                (1<<11)
#define IN_RUN                        (1<<12)
#define IN_RELOAD                (1<<13)
#define IN_ALT1                        (1<<14)
#define IN_SCORE                (1<<15)


JoKeR LauGh 06-06-2012 08:30

Re: Hold Button
 
Quote:

Originally Posted by <VeCo> (Post 1723586)
What button?

any button

@jimaway
I know all the button for CS.

hleV 06-06-2012 08:35

Re: Hold Button
 
It's only possible to hook the buttons listed above.


All times are GMT -4. The time now is 01:37.

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