zmarketpurchasemax = 0 -> no rebuys instead of infinite
This commit is contained in:
parent
6c35c59b81
commit
134ca810d0
|
@ -276,7 +276,7 @@ WeaponsCacheData()
|
|||
|
||||
// ZMarket (module)
|
||||
new zmarketprice = KvGetNum(kvWeapons, "zmarketprice", -1);
|
||||
new zmarketpurchasemax = KvGetNum(kvWeapons, "zmarketpurchasemax", 0);
|
||||
new zmarketpurchasemax = KvGetNum(kvWeapons, "zmarketpurchasemax", -1);
|
||||
KvGetString(kvWeapons, "zmarketcommand", zmarketcommand, sizeof(zmarketcommand), "");
|
||||
|
||||
new Handle:arrayWeapon = GetArrayCell(arrayWeapons, x);
|
||||
|
|
|
@ -811,7 +811,7 @@ ZMarketMenuTypeWeapons(client)
|
|||
}
|
||||
|
||||
// If max purchases is disabled for the weapon, then set as known integer to be later replaced.
|
||||
if (purchasemax <= 0)
|
||||
if (purchasemax < 0)
|
||||
{
|
||||
purchasesleft = -1;
|
||||
}
|
||||
|
@ -962,7 +962,7 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
|
|||
new purchasemax = WeaponsGetZMarketPurchaseMax(weaponindex);
|
||||
new purchasecount = ZMarketGetPurchaseCount(client, weapon);
|
||||
new purchasesleft = purchasemax - purchasecount;
|
||||
if (purchasemax > 0 && purchasesleft <= 0)
|
||||
if (!rebuy && purchasemax >= 0 && purchasesleft <= 0)
|
||||
{
|
||||
TranslationPrintToChat(client, "Weapons zmarket purchase max", weapondisplay, purchasemax);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user