[SOLVED] Any way to hook +use?.
Hi again.
I'm searching for a way to hook +use (E key) to do something. Actually, I'm using the forward "FM_CmdStart" but it's called many times and I only need when the player press +use key, I think that it isn't optimized, or am I wrong?. Another way to hook +use more optimized?. Thanks guys, bye. |
Re: Any way to hook +use?.
Hook Ham_ObjectCaps.
|
Re: Any way to hook +use?.
try
PHP Code:
|
Re: Any way to hook +use?.
No.
|
Re: Any way to hook +use?.
Thanks Arshine. But if I leave the key pressed the funtion is execute a lot of times. How I can do to execute the funtion one time only when the key is pressed and don't execute more until the player press again the key?
Quote:
|
Re: Any way to hook +use?.
Just make a var. Set to 1 when the first +use is called, and make a check at the start if this var is set to 0.
|
Re: Any way to hook +use?.
Quote:
|
Re: Any way to hook +use?.
Hey, this metod is good to hook other gamefunctions like slot6 or +jump?
|
Re: Any way to hook +use?.
To "slot6" you can use ->
PHP Code:
PHP Code:
|
Re: Any way to hook +use?.
thanks for fast reply, i will test it later :)
@Edit: Quote:
|
| All times are GMT -4. The time now is 03:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.