Raised This Month: $32 Target: $400
 8% 

body health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 07-16-2015 , 10:06   body health
Reply With Quote #1

how to get the health of an entity models, and not the player?
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 07-16-2015 , 11:26   Re: body health
Reply With Quote #2

new Float:health;

fakemeta way: pev(entity, pev_health, health)
engine way: health = entity_get_float(entity, EV_FL_health)
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 07-16-2015 , 11:56   Re: body health
Reply With Quote #3

thx
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 07-16-2015 , 14:22   Re: body health
Reply With Quote #4

does not work, I am trying to buy the health of an entity and do something.

if(health < 100)
{
do something
}
else if(health < 50)
{
do something
}

Last edited by felipemilralze; 07-16-2015 at 14:23.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:51.


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