BossHP: limit cash gain to sm_maxcash
This commit is contained in:
parent
065941b8e3
commit
473abce62e
@ -84,7 +84,10 @@ public void OnBossDamaged(CBoss Boss, CConfig Config, int client, float damage)
|
|||||||
if (!IsValidClient(client))
|
if (!IsValidClient(client))
|
||||||
return;
|
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;
|
bool bBreakable;
|
||||||
CConfig _Config = view_as<CConfig>(Config);
|
CConfig _Config = view_as<CConfig>(Config);
|
||||||
|
Loading…
Reference in New Issue
Block a user