Raised This Month: $ Target: $400
 0% 

Healing always to 100 hp no matter what I change. Need 255.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 07-30-2009 , 09:55   Healing always to 100 hp no matter what I change. Need 255.
Reply With Quote #1

Hello,

Problem is with blockmaker heal block:

If I have 255 hp and I go on heal block it goes back 100, I tried everything, I even changed it all to 255 to see if it will heal to 255, still 100.

Code:
actionHeal(id)
{
    if (halflife_time() >= gfNextHealTime[id])
    {
        new szPlayerName[32];
            get_user_name(id, szPlayerName, 32);
        new hp = get_user_health(id);
        new amount = floatround(get_cvar_float("bm_healamount"), floatround_floor);
        new sum = (hp + amount);
        
        if (sum < 100)
        {
            set_user_health(id, sum);
        }
        else
        {
            set_user_health(id, 100);
        }
        
        gfNextHealTime[id] = halflife_time() + 0.5;
    }
}
I need it so if you have less then 100hp it will heal to 100. If you have like 101 it will heal to 255.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
 


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 18:24.


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