Raised This Month: $ Target: $400
 0% 

[HELP] Scoping damage not being multiplied


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 06-14-2011 , 07:43   [HELP] Scoping damage not being multiplied
Reply With Quote #1

Ham_TraceAttack(post/pre)
PHP Code:
public fw_TraceAttack(victimattackerFloat:damageFloat:direction[3], trdamagebits)
{
    if(
victim == attacker || !is_user_alive(attacker) || !is_user_alive(victim) || !zp_get_user_zombie(victim))
        return 
HAM_IGNORED
        
    
if(!(<= victim <= iMaxPlayers))
        return 
HAM_IGNORED
        
    
if(get_tr2(trTR_iHitgroup) == HIT_HEAD)
    {
        
IsHeadshot[attacker] = true
    
}
    return 
HAM_IGNORED

FM_TraceLine(post/pre)
PHP Code:
public fw_TraceLine(Float:start[3], Float:end[3], noMonstersidtrace)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
    
    
static victimvictim get_tr2(traceTR_pHit)
    
    if(!(
<= victim <= iMaxPlayers) || !is_user_alive(victim))
        return 
FMRES_IGNORED
    
    
if(get_tr2(traceTR_iHitgroup) == HIT_HEAD && (pev(idpev_button) & IN_ATTACK))
    {
        
IsHeadshot[id] = true
    
}
    
    return 
FMRES_IGNORED

Ham_TakeDamage(pre)
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if(
victim == attacker || !is_user_alive(victim) || !is_user_alive(attacker))
        return 
HAM_IGNORED
        
    
if(iCurrentClass[victim] == && !zp_get_user_zombie(victim))
        
set_pdata_float(victimOFFSET_PAINSHOCK1.0OFFSET_LINUX)
    
    if(!
zp_get_user_zombie(victim))
        return 
HAM_IGNORED
    
    
switch(iCurrentClass[attacker])
    {
        case 
1:
        {
            if(
SUPPORT_SPECIALIST)
                
SetHamParamFloat(4damage dmg_ss)
        }
        case 
2:
        {
            if(
SHARPSHOOTER)
            {
                if(
IsHeadshot[attacker])
                {
                    
IsHeadshot[attacker] = false
                    SetHamParamFloat
(4damage dmg_s hsdmg_s)
                }
                    
                else
                {
                    
SetHamParamFloat(4damage dmg_s)
                }
            }
        }
        case 
3:
        {
            if(
COMMANDO)
                
SetHamParamFloat(4damage dmg_c)
        }
        case 
4:
        {
            if(
BERSERKER)
                
SetHamParamFloat(4damage dmg_b)
        }
    }
    return 
HAM_IGNORED

Define
PHP Code:
#define SHARPSHOOTER        (iCurrentWeapon[attacker] == CSW_SCOUT || iCurrentWeapon[attacker] == CSW_AWP || iCurrentWeapon[attacker] == CSW_SG550 || iCurrentWeapon[attacker] == CSW_G3SG1 || iCurrentWeapon[attacker] == CSW_GLOCK18 || iCurrentWeapon[attacker] == CSW_USP || iCurrentWeapon[attacker] == CSW_P228 || iCurrentWeapon[attacker] == CSW_DEAGLE || iCurrentWeapon[attacker] == CSW_ELITE) 
Snipers damage multiplier doesn't seems to work at all. Other pistols damage do multiply. Sry. Could only give codes related to the problem.

Focus on the case 2 which is Sharpshooter.

More description:
Scope damage doesn't multiplies but without scope it does multiply.

Last edited by Excalibur.007; 06-15-2011 at 20:37.
Excalibur.007 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:34.


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