BossHP: limit cash gain to sm_maxcash

This commit is contained in:
dogan 2020-08-16 22:43:52 +02:00
parent 065941b8e3
commit 473abce62e

View File

@ -84,7 +84,10 @@ public void OnBossDamaged(CBoss Boss, CConfig Config, int client, float damage)
if (!IsValidClient(client))
return;
SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + 2);
int iMaxCash = GetConVarInt(FindConVar("sm_maxcash"));
if(!(GetEntProp(client, Prop_Send, "m_iAccount") >= iMaxCash))
SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + 2);
bool bBreakable;
CConfig _Config = view_as<CConfig>(Config);