Counter-Strike: Fixed being able to buy ammo outside of the buy-time...

This commit is contained in:
Marco Cawthorne 2020-04-23 05:19:38 +02:00
parent 4794f45cb1
commit d8b832041c

View file

@ -167,6 +167,11 @@ CSEv_AmmoBuySecondary(void)
int cal = 0;
int ps = 0;
player pl = (player)self;
CSGameRules rules = (CSGameRules)g_grMode;
if (rules.BuyingPossible(pl) == FALSE) {
return;
}
for (int i = 1; i < g_weapons.length; i++) {
if ((pl.g_items & g_weapons[i].id) && (g_weapons[i].slot == 1)) {
@ -209,6 +214,11 @@ CSEv_AmmoBuyPrimary(void)
int ps = 0;
int cal = 0;
player pl = (player)self;
CSGameRules rules = (CSGameRules)g_grMode;
if (rules.BuyingPossible(pl) == FALSE) {
return;
}
for (int i = 1; i < g_weapons.length; i++) {
if ((pl.g_items & g_weapons[i].id) && (g_weapons[i].slot == 0)) {