best way to catch changed hp
hey,
i want to write a mod for fy_rambohulk http://www.fpsbanana.com/maps/2522 . so i want to catch the hulk. i tough i can catch the users health in prethink and if is the users health over 1000, is my user the hulk. but i think its not a good idea to catch it in prethink. has anyone a idea in which way i can do it better? |
Re: best way to catch changed hp
I think you can use client_infochanged(), but I can't remember exactly.
|
Re: best way to catch changed hp
client_infochanged() is not hooked or even executed when a clients health changes. I dont really see a problem using PreThink though. There may be some other way that you could check the clients health for efficiently, but PreThink should do the job.
|
Re: best way to catch changed hp
Just check everyone's hp on spawn, and if someone has over 1000 hp, store their index in a global variable.
|
Re: best way to catch changed hp
ty.
i just tough there are/is better ways to get this. @ Jon : the problem is that the player has to be in a placer for 10 sec. to get hulk. all users spawn with 100hp. so thats why i cant forward spawns :D |
Re: best way to catch changed hp
Try to hook Ham_Blocked or Ham_TakeDamage (DMG_CRUSH)
|
Re: best way to catch changed hp
Easiest way I would think would be to register the Health event from HL...
|
Re: best way to catch changed hp
Quote:
Quote:
|
Re: best way to catch changed hp
ham_const.inc
PHP Code:
|
Re: best way to catch changed hp
See the ham_const.inc.
If I say Ham_Blocked is because the health is given from func_door. You have 4 func_door above the area when you jump. And the health is given from CBaseDoor::Blocked(). So doing : Code:
Quote:
|
| All times are GMT -4. The time now is 17:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.