[HELP] Last Problem! =]
Code:
if (sum < 100)How can you make it so when you touch the heal block n u got over 100 hp it doesnt just set it to 100 again. And I have a 2nd block called SuperHeal making it go from 0-220 HP but when i go in it, it just sets it down to 100 please help! |
Re: [HELP] Last Problem! =]
Quote:
set_user_health(id, get_user_health(id) + 100 ); ?? |
Re: [HELP] Last Problem! =]
I want it capped at 255
Here Super Heal Code (Up to 220 HP) dont set it back to 220 or 100 if u have 255 HP: Code:
actionSHEAL(id)Code:
actionHeal(id) |
Re: [HELP] Last Problem! =]
PHP Code:
|
Re: [HELP] Last Problem! =]
if (halflife_time() >= gfNextHealTime[id])
{ new amount = floatround(get_cvar_float("bm_healamount"), floatround_floor); set_user_health( id , clamp( get_user_health( id ) + clamp( amount , 100 ) , 0 , 255 ) ); gfNextHealTime[id] = halflife_time() + 0.5; } And if its SHEAL it would be: if (halflife_time() >= gfNextHealTime[id]) { new amount = floatround(get_cvar_float("bm_shealamount"), floatround_floor); set_user_health( id , clamp( get_user_health( id ) + clamp( amount , 200 ) , 0 , 255 ) ); gfNextHealTime[id] = halflife_time() + 0.5; } rite? |
Re: [HELP] Last Problem! =]
shouldnt sheal be 220 and not 200 or is the above a typo
|
Re: [HELP] Last Problem! =]
yea sry its correct rite?
|
Re: [HELP] Last Problem! =]
It should, try it out and let me know. Quick question, why are you rounding a cvar?
|
Re: [HELP] Last Problem! =]
rounding? lmao sry not so good with the scripting terms
|
Re: [HELP] Last Problem! =]
i tryed it and i posted the new script and wat errors i got.
|
| All times are GMT -4. The time now is 13:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.