Raised This Month: $ Target: $400
 0% 

Damage problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fixsek Kot
Member
Join Date: Feb 2022
Old 07-10-2022 , 12:38   Damage problem
Reply With Quote #1

Hi, here I am again.

I really didn't think I would have any other problem, but I didn't expect to have a problem with something stupid I can't resolve:
(This whole code is in ham_takedamage PRE)
PHP Code:
if(farpiece[attacker])
{
    if(
get_user_weapon(attacker) == CSW_AK47 && damagetype DMG_BULLET)
    {
        if(
get_pdata_int(victim75) == HIT_HEAD)
        {
            
SetHamParamFloat(4get_pcvar_float(farpiece_damagehs))
        }
        else
        {
            
SetHamParamFloat(4get_pcvar_float(farpiece_damage))
        }
    }
}
if(
level[id] >= 1)
{
    
SetHamParamFloat(4damage*leveldamage)

So basically I have a weapon that deals 67dmg, called farpiece, and when player reaches level one, all dmg he deals will be increased by 10%. The problem is that I thought the Float:damage receives the damage the farpiece does, and increases it by 10%, however it doesn't take farpiece's damage, it only takes damage that the original gun makes and totally ignores the farpiece... I thought this is going to be easy to resolve, but... it's ripping my guts out. Yeah I can add the damage right in the farpiece damage, but I also need the damage to be increased for other casual guns, but I'd have to add SetHamParamFloat that receives damage, but again, it totally disables farpiece's damage, I couldn't find any solution for this queer issue, so how do I fix it?

Last edited by Fixsek Kot; 07-10-2022 at 12:42.
Fixsek Kot 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 15:35.


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