Raised This Month: $51 Target: $400
 12% 

[Nvm, Solved] Get_user_health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
louistds
Member
Join Date: Oct 2010
Old 05-04-2011 , 03:43   [Nvm, Solved] Get_user_health
Reply With Quote #1

Anyone knows how do i check if user health is >2500 but <3500 ?

Edit: Found out how to

PHP Code:
if (get_user_health(id) >2500 && get_user_health(id) <3500
__________________

Last edited by louistds; 05-04-2011 at 03:54.
louistds is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-04-2011 , 03:47   Re: [Questions] Get_user_health
Reply With Quote #2

i dont get the point.
__________________
jc980 is offline
louistds
Member
Join Date: Oct 2010
Old 05-04-2011 , 03:51   Re: [Nvm, Solved] Get_user_health
Reply With Quote #3

Nvm , found out how to.
__________________
louistds is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-04-2011 , 11:26   Re: [Nvm, Solved] Get_user_health
Reply With Quote #4

It's better to cache get_user_health value so you only call the native once :

Code:
new iHealth = get_user_health(id) if ( iHealth > 2500 && iHealth < 3500 )

Or you can do like this :
Code:
if ( 2500 < get_user_health(id) < 3500 )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-21-2011 , 13:10   Re: [Nvm, Solved] Get_user_health
Reply With Quote #5

Sorry for reviving but I see the rules say ( I see video about posting ) it says that instead of making a new thread better use the old one . So I have 1 question.

@Connor
can I do like this if I want to detect the player health is above 2000 but below 3000 like this
Code:
if ( 2000 > get_user_health(id) < 3000 )
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.

Last edited by JoKeR LauGh; 12-21-2011 at 13:11.
JoKeR LauGh is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-21-2011 , 13:28   Re: [Nvm, Solved] Get_user_health
Reply With Quote #6

Code:
2000 >
->
Code:
2000 <
__________________
hleV is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-21-2011 , 16:32   Re: [Nvm, Solved] Get_user_health
Reply With Quote #7

the ">" symbol doesn't have any function?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-22-2011 , 08:13   Re: [Nvm, Solved] Get_user_health
Reply With Quote #8

You want health to be above 2000, so
Code:
2000 < get_user_health(id)
does that.
__________________
hleV is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-22-2011 , 10:29   Re: [Nvm, Solved] Get_user_health
Reply With Quote #9

If below?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-22-2011 , 11:57   Re: [Nvm, Solved] Get_user_health
Reply With Quote #10

@JoKeR
It means:
PHP Code:
if ( 2000 [is less thanget_user_health() ) 
Erox902 is offline
Reply



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 02:10.


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