Raised This Month: $32 Target: $400
 8% 

Ham_TakeDamage not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 03-17-2021 , 01:52   Ham_TakeDamage not working
Reply With Quote #1

I would like execute a damage to a player - code (1)

However, the damage is done only if ExecuteHam is used instead of ExecuteHamB

Does this imply a Ham_TakeDamage virtual function hooked somewhere blocked the damage?

Thanks.

code 1:
PHP Code:
public BurnT(taskid)
{

    new 
id taskid FIRE_ID;

    static 
type[16];
    
GetPlayerType(idtypecharsmax(type));

    new 
HE create_entity("weapon_hegrenade")

    
ExecuteHamB(Ham_TakeDamageidHEpev(idpev_euser4), FireDamage1<<24 );

    
remove_entity(HE

    
client_print(idprint_center"你正被燃燒 !")

    if( !
equal(type"Assassin") )
    {
        
fm_set_rendering(idkRenderFxGlowShell25500kRenderNormal20);
    }

    
gBurnTimes[id]--;

    if(
gBurnTimes[id] > 0)
        
set_task(1.0"BurnT"id+FIRE_ID__"a"1); // Burn 100
    
else
    {
        if( !
equal(type"Assassin") )
        {
            
fm_set_rendering(idkRenderFxNone000kRenderNormal16);
        }

    }



davidto1995 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 03-17-2021 , 03:03   Re: Ham_TakeDamage not working
Reply With Quote #2

There might be other plugin that SUPERCEDE Ham_TakeDamage

Code:
ExecuteHamB = trigger all hook of other plugins that hook that ham (modifine, edit, stop,..) then execute
Code:
ExecuteHam = just execute without trigger all hooks on that function
__________________
My plugin:

Last edited by Celena Luna; 03-17-2021 at 03:03.
Celena Luna is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-17-2021 , 09:09   Re: Ham_TakeDamage not working
Reply With Quote #3

Quote:
Does this imply a Ham_TakeDamage virtual function hooked somewhere blocked the damage?
Yes.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


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 21:33.


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