AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage multiplier (https://forums.alliedmods.net/showthread.php?t=140280)

zirualas 10-10-2010 10:25

Damage multiplier
 
Ok i want to do that knife dmg multiple have only CT. Here is my code:
PHP Code:

public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if (
get_user_weapon(attacker) == CSW_KNIFE)
    
SetHamParamFloat(4damage 2)



5c0r-|3i0 10-10-2010 10:51

Re: Damage multiplier
 
if( cs_get_user_team(attacker) != CS_TEAM_CT )
return HAM_IGNORED

Sorry if I was wrong :d

SaM.ThE.MaN 10-10-2010 11:18

Re: Damage multiplier
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 1321175)
if( cs_get_user_team(attacker) != CS_TEAM_CT )
return HAM_IGNORED

Sorry if I was wrong :d

Actually ... Its correct ...

hleV 10-10-2010 12:54

Re: Damage multiplier
 
Not sure about the DMG_BLAST thingie.
PHP Code:

public fw_TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{
        if (!
attacker || damagebits DMG_BLAST
        
|| cs_get_user_team(attacker) != CS_TEAM_CT
        
|| get_user_weapon(inflictor) != CSW_KNIFE)
                return 
HAM_IGNORED;
 
        
SetHamReturnFloat(4damage 2);
 
        return 
HAM_HANDLED;



zirualas 10-10-2010 13:18

Re: Damage multiplier
 
I used 5c0r-|3i0 code and it helped me ;p
Hlev thanks anyway.

5c0r-|3i0 10-11-2010 04:42

Re: Damage multiplier
 
@hlev :
Quote:

#define DMG_HEGRENADE (1<<24)
Is DMG_BLAST differ to DMG_HEGRENADE ?
I usually use this more than DMG_BLAST ...

hleV 10-11-2010 05:11

Re: Damage multiplier
 
Quote:

Originally Posted by zirualas (Post 1321298)
I used 5c0r-|3i0 code and it helped me ;p
Hlev thanks anyway.

What if you deal damage to enemy with a grenade while you're running with a knife?
Quote:

Originally Posted by 5c0r-|3i0 (Post 1321881)
@hlev :

Is DMG_BLAST differ to DMG_HEGRENADE ?
I usually use this more than DMG_BLAST ...

Yeah, that must be it.


All times are GMT -4. The time now is 10:26.

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