Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Commit ad89d8a

Browse files
committed
Removed CS_OnBuyAttempt
Removed CS_OnBuyAttempt.
1 parent a8a86c7 commit ad89d8a

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

addons/amxmodx/scripting/PugCS.sma

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -561,19 +561,6 @@ public PugMoneyTeam(id)
561561
show_hudmessage(id,sHud);
562562
}
563563

564-
public CS_OnBuyAttempt(id,iItem)
565-
{
566-
if((iItem == CSI_DEFUSER) && !cs_get_user_defuse(id) && (cs_get_user_team(id) == CS_TEAM_CT))
567-
{
568-
new iMoney = cs_get_user_money(id);
569-
570-
if(iMoney >= 200)
571-
{
572-
cs_set_user_money(id,iMoney - 200);
573-
}
574-
}
575-
}
576-
577564
public CS_OnBuy(id,iItem)
578565
{
579566
switch(iItem)
@@ -591,6 +578,18 @@ public CS_OnBuy(id,iItem)
591578
{
592579
return get_pcvar_num(g_pBlockShield) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
593580
}
581+
case CSI_DEFUSER: // Fix for money deduce when buy a defuse (Test)
582+
{
583+
if(!cs_get_user_defuse(id) && (cs_get_user_team(id) == CS_TEAM_CT))
584+
{
585+
new iMoney = cs_get_user_money(id);
586+
587+
if(iMoney >= 200)
588+
{
589+
cs_set_user_money(id,iMoney - 200);
590+
}
591+
}
592+
}
594593
}
595594

596595
return PLUGIN_CONTINUE;

0 commit comments

Comments
 (0)