Raised This Month: $ Target: $400
 0% 

Multiply slash damage by two


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-29-2012 , 00:47   Re: Multiply slash damage by two
Reply With Quote #8

You can see in cssdk : http://code.google.com/p/cs-sdk/sour.../wpn_knife.cpp
that on slah, pre-damage passed is 15.0 or 20.0, and on stab, damage is 65.0 (or 65.0 * 3.0)

PHP Code:
#include <amxmodx>

#include <hamsandwich>


new g_iMaxPlayers
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )

public plugin_init()
{
    
g_iMaxPlayers get_maxplayers()
    
RegisterHam(Ham_TraceAttack"player""OnCBasePlayer_TraceAttack"false)
}

public 
OnCBasePlayer_TraceAttack(idiAttackerFloat:flDamage /* , Float:fVecDir[3], ptr, bitsDamageType */ )
{
    if( 
IsPlayer(iAttacker) && flDamage 21.0 && get_user_weapon(iAttacker) == CSW_KNIFE )
    {
        
SetHamParamFloat(3flDamage 2.0)
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-29-2012 at 01:21.
ConnorMcLeod 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 06:19.


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