Raised This Month: $ Target: $400
 0% 

Using health as a percent value


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 02-14-2013 , 12:40   Re: Using health as a percent value
Reply With Quote #3

Quote:
Originally Posted by fl0werD View Post
Float.
@off:
WHY GODDAMMIT GET STUCK WITH THINGS LIKE THIS.[/rage]

@On:
Thanks.
I'm doing this on takeDamage:
PHP Code:
new percentage get_user_health(victim)*100/percentage[victim]
set_pev(victim,pev_health,float(percentage)) 
And (i think ovbious) sets the health to 99. Can't be done whitout changing the player's health.
XINLEI is offline
 



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 20:35.


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