Removing grappling hook
I've made my own grappling hook which pulls people towards me. I'm just having problems removing the hook once the person is right next to me or touches me when they are still hooked...
PHP Code:
|
Re: Removing grappling hook
Quote:
register_concmd("+hook","hook_on") register_concmd("-hook","hook_off") |
Re: Removing grappling hook
...
If you have read the script... I didn't even register a console command... So the above example won't help me at all. And I also don't want to make a custom bind for the hook. I want to change a halflife default key to it and I'm just using the flashlight key for a quick test for it. |
Re: Removing grappling hook
Why not register_touch() the two players and use client_PreThink() to check if player touched or is too close.
|
Re: Removing grappling hook
I did exactly what you said above before I posted this but didn't seem to work for me. I just decided to take it out and just post what I had from the start.
I'm just afraid that cycling through with client_prethink is a lot of work for this anyway so I scrapped that idea. |
Re: Removing grappling hook
As a side note, use register_impulse(100, "Your_Function") instead of client_impulse forward.
|
Re: Removing grappling hook
Hmm... Don't want to use regsiter_impulse because its from the Engine module.
http://www.amxmodx.org/funcwiki.php?go=func&id=462 |
Re: Removing grappling hook
Same for client_impulse, the only reason your plugin compiles is that it is a forward.
http://www.amxmodx.org/funcwiki.php?...ulse&go=search This forward is fired every frame, with register_impulse, the function will be called only when impulse = 100 |
Re: Removing grappling hook
Also, Engine has been proven to be a lot more efficient rather than Fakemeta.
Oh and why do you get the player's velocity twice without even using it the first time..? PHP Code:
|
Re: Removing grappling hook
Quote:
@Mini_Midget Take a look in the Code Snippets/Tutorials section about a thread for Module Efficiency. It should be near the top. |
| All times are GMT -4. The time now is 08:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.