Raised This Month: $ Target: $400
 0% 

Detect damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
reinert
Veteran Member
Join Date: Feb 2007
Old 06-17-2011 , 07:48   Re: Detect damage
Reply With Quote #3

Like this: ?

PHP Code:
RegisterHam(Ham_TakeDamage"player""Ham_DamageKNIFE")

public 
Ham_DamageKNIFE(idinflictorattackerFloat:damagedamagebits)
{
    if ( !(
<= attacker <= g_maxplayers) || !g_KNIFE[attacker])
            return 
HAM_IGNORED;
        
    if(
inflictor == attacker)
    {
        new 
weaponx get_user_weapon(attacker__);
        if( 
weaponx == CSW_KNIFE && get_user_team(attacker) == 2)
        {
        
SetHamParamFloat(4damage get_pcvar_float(damage_knife)); //Knife damage
        
return HAM_HANDLED;
        }
    }
    return 
HAM_IGNORED;

reinert is offline
 



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 23:30.


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