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