Raised This Month: $344 Target: $400
 86%   Almost there!

user health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 11-04-2018 , 12:23   user health
Reply With Quote #1

Code:
case 0:
		{
			set_user_health(id,get_user_health(id) + 100 );
		}
alright, i've searched, i've tried by myself, but haven't get it.
if user health is < 100, then hp should be 100, not over 100,
if user health is = 100, ChatColor id "you already have 100 hp"
its like, if you have 99 hp and use that case, you're incrasing 1 hp, to have 100,
thanks
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 11-04-2018 , 12:34   Re: user health
Reply With Quote #2

PHP Code:
new health get_user_health(id);

If( 
health != 100 )
    
set_user_health(id100);
else
    
ColorChat(idGREEN"already 100"); 
__________________
marcelowzd is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 11-04-2018 , 12:39   Re: user health
Reply With Quote #3

thanks
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
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 11:08.


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