Raised This Month: $ Target: $400
 0% 

Loosing healthpack on healerblock.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D-TOX
Member
Join Date: Mar 2008
Old 11-21-2009 , 13:54   Loosing healthpack on healerblock.
Reply With Quote #1

Hi ! I'm just curious how to fix so you won't loose any HP if we say you get a healthpack with 200 HP and you walk onto a healer block, and it drops down to 100 HP. I use a modified version of Necros 3.60 BM.
The healing code aint modified.


Any helpful answer would be great !
__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
D-TOX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-21-2009 , 14:00   Re: Loosing healthpack on healerblock.
Reply With Quote #2

What kind of healer ?
Map healer ?
Plugin healer ?

I guess you have to fix your necro plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-21-2009 , 16:58   Re: Loosing healthpack on healerblock.
Reply With Quote #3

How is that done?
Does it give you instantly 100 HP, or is it healing you for example for 5hp/sec?
Backstabnoob is offline
D-TOX
Member
Join Date: Mar 2008
Old 11-22-2009 , 11:46   Re: Loosing healthpack on healerblock.
Reply With Quote #4

Quote:
Originally Posted by Backstabnoob View Post
How is that done?
Does it give you instantly 100 HP, or is it healing you for example for 5hp/sec?

1 HP per second, and there is a cvar for how much HP you should get per second.

Quote:
Originally Posted by ConnorMcLeod View Post
What kind of healer ?
Map healer ?
Plugin healer ?

I guess you have to fix your necro plugin.

And I don't know what you mean by fixing the blockmaker, I haven't touched the healer code, nor made anything that should harm the healing block.
You can read on the Blockmaker 4.01 thread how it works if you don't know what the healing block does.

PHP Code:
actionHeal(id)
{
    if (
halflife_time() >= gfNextHealTime[id])
    {
        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(idsum);
        }
        else
        {
            
set_user_health(id100);
        }
        
        
gfNextHealTime[id] = halflife_time() + 0.5;
    }

__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Last edited by D-TOX; 11-22-2009 at 11:52.
D-TOX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2009 , 12:50   Re: Loosing healthpack on healerblock.
Reply With Quote #5

Update the code with that one and recompile :

PHP Code:
actionHeal(id)
{
    new 
Float:fGameTime get_gametime()
    if(
fGameTime gfNextHealTime[id])
    {
        new 
iHealth get_user_health(id);
        if( 
iHealth 100 )
        {
            static 
pCvarBmHealAmount;
            if( !
pCvarBmHealAmount )
            {
                
pCvarBmHealAmount get_cvar_pointer("bm_healamount");
            }
            
iHealth += get_pcvar_num(pCvarBmHealAmount);
            if( 
iHealth 100 )
            {
                
iHealth 100;
            }
            
set_user_health(idiHealth);
            
gfNextHealTime[id] = fGameTime 0.5;
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
D-TOX
Member
Join Date: Mar 2008
Old 11-22-2009 , 13:51   Re: Loosing healthpack on healerblock.
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Update the code with that one and recompile :

PHP Code:
actionHeal(id)
{
    new 
Float:fGameTime get_gametime()
    if(
fGameTime gfNextHealTime[id])
    {
        new 
iHealth get_user_health(id);
        if( 
iHealth 100 )
        {
            static 
pCvarBmHealAmount;
            if( !
pCvarBmHealAmount )
            {
                
pCvarBmHealAmount get_cvar_pointer("bm_healamount");
            }
            
iHealth += get_pcvar_num(pCvarBmHealAmount);
            if( 
iHealth 100 )
            {
                
iHealth 100;
            }
            
set_user_health(idiHealth);
            
gfNextHealTime[id] = fGameTime 0.5;
        }
    }

Didnt work.


//// ijump_ibcm.sma
// C:\Program Files\Steam\steamapps\anton_sexy\counter-strike\cstrike\addons\amx
modx\Copy of scripting\ijump_ibcm.sma(1476) : error 001: expected token: ";", bu
t found "if"
//
// 1 Error.
// Could not locate output file compiled\ijump_ibcm.amx (compile failed).

Press enter to exit ...


Row 1476 : if(fGameTime > gfNextHealTime[id])
__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Last edited by D-TOX; 11-22-2009 at 14:02.
D-TOX is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-22-2009 , 14:56   Re: Loosing healthpack on healerblock.
Reply With Quote #7

Just read.
Add ; at the end of
new Float:fGameTime = get_gametime()
Backstabnoob is offline
D-TOX
Member
Join Date: Mar 2008
Old 11-22-2009 , 17:37   Re: Loosing healthpack on healerblock.
Reply With Quote #8

Quote:
Originally Posted by Backstabnoob View Post
Just read.
Add ; at the end of
new Float:fGameTime = get_gametime()
Still didnt work, got errors on all blockfunctions if i add new Float:fGameTime = get_gametime();
__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
D-TOX is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2009 , 18:10   Re: Loosing healthpack on healerblock.
Reply With Quote #9

You failed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
D-TOX
Member
Join Date: Mar 2008
Old 11-22-2009 , 18:14   Re: Loosing healthpack on healerblock.
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
You failed.
I did actually fail O.O Thanx alot and my apologies if I hurt your feelings
Excellent use of your brain i may say
__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Last edited by D-TOX; 11-22-2009 at 21:28.
D-TOX 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 13:10.


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