AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]catch key (https://forums.alliedmods.net/showthread.php?t=100406)

One 08-14-2009 09:33

[SOLVED]catch key
 
isnt there no in_flashlight?
i want to catch impulse 100 :O

Bugsy 08-14-2009 09:53

Re: catch key
 
hlsdk_const.inc
Code:

#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)    // Used by client.dll for when scoreboard is held down


Xanimos 08-14-2009 09:57

Re: catch key
 
There's an event called Flashlight. Check out Avalanche's post

xPaw 08-14-2009 10:04

Re: catch key
 
register_impulse ?

One 08-14-2009 10:05

Re: catch key
 
@ bugsy : ty thats why i asked, cuz i couldnt find in_flash or in_impulse or somthing like this.

@ xanimos : ty i got it
register_event("Flashlight","event_flashlight ","b");
or how xpaw said :

egister_impulse( 100, "your func" );

new question : which is better or better said faster?

Xanimos 08-14-2009 10:13

Re: catch key
 
The difference in speed between the two would be too minuscule to make a difference.

One 08-14-2009 10:23

Re: [SOLVED]catch key
 
ok @ ty again


All times are GMT -4. The time now is 15:16.

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