Raised This Month: $ Target: $400
 0% 

Why this HamHook doesn't work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 06-24-2014 , 17:17   Why this HamHook doesn't work?
Reply With Quote #1

Hello,

Im trying to do a game for jailbreak, in which nemesis kills terrorist on one shot, but ham for it doesn't work. Can someone tell me what's wrong?
Thanks

Code:
new HamHook: hDmg;
....
public OnRemoveData(day){
  if(day == id_game){
             if(hDmg)
            DisableHamForward(hDmg);
    }
}
....
public OnDayStart(day)
{
    if(day == id_game)
    {
        if(!hDmg)
            hDmg = RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage_JedenCios");
        else
            EnableHamForward(hDmg);
    }
}
....
public fwTakeDamage_JedenCios(id, ent, attacker)
{
    if(is_user_alive(attacker) && get_user_team(id) == 2 && get_user_weapon(attacker) == CSW_KNIFE)
    {
        cs_set_user_armor(id, 0, CS_ARMOR_NONE);
        SetHamParamFloat(4, float(get_user_health(id) + 1));
        return HAM_HANDLED;
    }
    return HAM_IGNORED;
}
danonix 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 21:09.


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