cant catch landing
I have two sounds - jump & landing
I cant get the landing sound to work Ive tried fakemeta engine many many ways/hours to cath FL_onground // with oldbutton /buttons with pev . other ways pls give some working code to emit_sound on touch the ground |
Re: cant catch landing
and one more
how to properly kill task by its ID |
Re: cant catch landing
Quote:
|
Re: cant catch landing
set_task(1.0,"show_hudquad",123,"",0,"b")
return PLUGIN_CONTINUE; } public show_hudquad(id) { set_hudmessage(200, 100, 0, 0.05 , 0.85, 0, 6.0, 8.0, 0.1, 0.1, -1) show_hudmessage(id," Quad") } I know but I have error Host_Error: UserMsg: Not Present on Client 235 public hook_Death() { new victim = read_data(2); if(g_quad_owner == victim) { quad_disable remove_task(123) // kill hud task if the owner is dead and stupid xD } return PLUGIN_CONTINUE; } |
Re: cant catch landing
Use [code] or [php] tags around code.
Quote:
|
Re: cant catch landing
yes, probably with ent touch.Ill try again (
what about LANDING SOUND ???? give me some WORKING code I tried all variants with engine / fakemeta pev FL_ONGROUND but sound dont work, it works from cs, but not from my plugin ( |
Re: cant catch landing
Not sure what your intentions are or if this is what you're looking for but I figured I would take a stab at it without using prethink (which may be the best way). Are you trying to hook every time a player lands or only if he lands hard and takes damage? If the first, then my code will work 95% of the time. The only downfall is I am able to avoid the sound if I'm standing on a ledge and press a move button only briefly resulting in the player falling off and landing. If you are only looking to hook when falling from a distance and where damage is taken then you can do this easily by hooking FM_EmitSound.
PHP Code:
|
Re: cant catch landing
thanks bugsy I Know how to play sound on damage/landing.
|
Re: cant catch landing
Bugsy you are my hero it works exactly as I need ( I have added my jump sound.) thanks!!!!!
|
Re: cant catch landing
Code:
#include <amxmodx>#define PLAYER_FALL_PUNCH_THRESHHOLD (float)350 // won't punch player's screen/make scrape noise unless player falling at least this fast. |
| All times are GMT -4. The time now is 03:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.