AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Question (https://forums.alliedmods.net/showthread.php?t=135587)

marquezs 08-17-2010 16:37

Question
 
Can I do this?

Code:

set_user_health(id, 900 + (2 * (g_HealthLevel[id] * Health_PerLevel)))
or this

Code:

set_user_health(id, 2 * (g_HealthLevel[id] * Health_PerLevel) - 100)
It isn't working...

How may I do this?

platzpatrone 08-17-2010 16:39

Re: Question
 
u have to use:

get_user_health first to get the actual health left

then set it with the actual + your value

XxAvalanchexX 08-17-2010 19:26

Re: Question
 
marquezs: What doesn't work about it? I think most mods have a problem displaying health above 255 on the HUD because it is received as a byte (max value of 255), even though the actual health can be higher.

mottzi 08-18-2010 14:43

Re: Question
 
I think he´s not asking about if it can be shown, rather if the
Code:

900 + (2 * (g_HealthLevel[id] * Health_PerLevel))
part will work


All times are GMT -4. The time now is 21:54.

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