@@ -98,6 +98,7 @@ CConVar<bool> g_cvarInfectShake("zr_infect_shake", FCVAR_NONE, "Whether to shake
9898CConVar<float > g_cvarInfectShakeAmplitude (" zr_infect_shake_amp" , FCVAR_NONE , " Amplitude of shaking effect" , 15 .0f , true , 0 .0f , true , 16 .0f );
9999CConVar<float > g_cvarInfectShakeFrequency (" zr_infect_shake_frequency" , FCVAR_NONE , " Frequency of shaking effect" , 2 .0f , true , 0 .0f , false , 0 .0f );
100100CConVar<float > g_cvarInfectShakeDuration (" zr_infect_shake_duration" , FCVAR_NONE , " Duration of shaking effect" , 5 .0f , true , 0 .0f , false , 0 .0f );
101+ CConVar<bool > g_cvarEnableDamageCash (" zr_damagecash_enable" , FCVAR_NONE , " Enable cash damage on zombie or not" , false );
101102
102103// meant only for offline config validation and can easily cause issues when used on live server
103104#ifdef _DEBUG
@@ -1635,6 +1636,13 @@ void ZR_OnPlayerTakeDamage(CCSPlayerPawn* pVictimPawn, const CTakeDamageInfo* pI
16351636 {
16361637 auto flClassKnockback = 1 .0f ;
16371638
1639+ if (g_cvarEnableDamageCash.Get ())
1640+ {
1641+ const auto pKillerController = pKillerPawn->GetOriginalController ();
1642+ int money = pKillerController->m_pInGameMoneyServices ->m_iAccount ;
1643+ pKillerController->m_pInGameMoneyServices ->m_iAccount = money + damage;
1644+ }
1645+
16381646 if (pVictimController->GetZEPlayer ())
16391647 {
16401648 std::shared_ptr<ZRClass> activeClass = pVictimController->GetZEPlayer ()->GetActiveZRClass ();
0 commit comments