Returning a value(SOLVED)
I tried to get a player's health like this:
PHP Code:
What am I doing wrong here?:? |
Re: Returning a value
Code:
floatround( health );=> Code:
return floatround( health );Or I think it's possible to retrieve directly like that : Code:
return pev( index, pev_health )Code:
return get_user_health( index ) |
Re: Returning a value
Either do what Arkshine mentions or make your function a float.
Code:
|
Re: Returning a value
@Orangutanz - new Float:test = MyFunction( 100 );
|
Re: Returning a value
Quote:
|
Re: Returning a value
Quote:
Quote:
Quote:
Well, it appears I'm just too lazy to see if there are any other natvies/stocks/functions like get_user_health(..) which is much more simpler... But I think using the fakemeta way is a bit safer. Am I right?:o Should I use: PHP Code:
PHP Code:
Thanks all of you guys for the help, once I figure out what is the best method (amxmodx or fakemeta [or any other module]), i'll +K you all!:up: |
Re: Returning a value
Quote:
Quote:
|
Re: Returning a value
Then get_user_health(..) it is!:mrgreen:
Thanks a lot arkshine and all the others! +k P.S: when i use: return floatround(health); it works fine but i'll go with get_user_health anyways... |
Re: Returning a value
Quote:
Good information about pevs: String, Float, Integers etc... |
Re: Returning a value
Quote:
|
| All times are GMT -4. The time now is 03:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.