Raised This Month: $ Target: $400
 0% 

ham_takedamage prob


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
r0ck
Senior Member
Join Date: Jun 2011
Location: India
Old 09-19-2011 , 12:25   ham_takedamage prob
Reply With Quote #1

i'm using

PHP Code:
#define DMG_GRENADE            (1 << 24)

RegisterHam(Ham_TakeDamage"player""ham_damage")

public 
ham_damage(victimentattackerFloat:damagebits)
{
    if(!
is_user_connected(attacker) || victim == attacker)
        return 
HAM_IGNORED
        
    
if(cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_T && bits DMG_GRENADE)
    {
        
SetHamParamFloat(4damage 2)
        return 
HAM_OVERRIDE
    
}

But the problem is that when t's throw grenade on t's it sets half the damage(thats what i want) but if t's throw grenade of cts then too its half damage i want that if attacker is t and victim is t then only grenade damage half

thanks
__________________
Preparing to release my plugins..
r0ck 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 19:35.


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