Fixed ZMarket auto-rebuy and removed debug message.
This commit is contained in:
parent
23cc030dd5
commit
ec231ba66a
@ -250,7 +250,6 @@ VAmbienceApplySky(bool:disable = false)
|
||||
// If default, then set to default sky.
|
||||
if (disable)
|
||||
{
|
||||
PrintToServer("+===============+++++ %s", g_VAmbienceDefaultSky);
|
||||
if (g_VAmbienceDefaultSky[0])
|
||||
{
|
||||
SetConVarString(hSkyname, g_VAmbienceDefaultSky, true);
|
||||
|
@ -136,7 +136,7 @@ ZMarketOnClientSpawn(client)
|
||||
// If auto-rebuy is enabled, then force client to rebuy weapons.
|
||||
if (g_bZMarketAutoRebuy[client])
|
||||
{
|
||||
ZMarketRebuy(client);
|
||||
ZMarketRebuy(client, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -525,7 +525,7 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
|
||||
}
|
||||
|
||||
new bool:zmarketbuyzone = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]);
|
||||
if (zmarketbuyzone && !ZMarketIsClientInBuyZone(client))
|
||||
if (!rebuy && zmarketbuyzone && !ZMarketIsClientInBuyZone(client))
|
||||
{
|
||||
TranslationPrintToChat(client, "Weapons zmarket buyzone");
|
||||
return false;
|
||||
@ -625,9 +625,12 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
|
||||
// Add 1 to the client's purchase count.
|
||||
ZMarketSetPurchaseCount(client, weapon, 1, true);
|
||||
|
||||
if (slot != Slot_Invalid && slot != Slot_Projectile)
|
||||
{
|
||||
// Tell client they bought a weapon.
|
||||
TranslationPrintToChat(client, "Weapons zmarket purchase", weapon);
|
||||
}
|
||||
}
|
||||
else if (!rebuy)
|
||||
{
|
||||
// Get ammo type and stop if it's invalid.
|
||||
@ -652,7 +655,7 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false)
|
||||
*
|
||||
* @param client The client index.
|
||||
*/
|
||||
ZMarketRebuy(client)
|
||||
ZMarketRebuy(client, bool:rebuy = false)
|
||||
{
|
||||
// If client is a zombie, then stop.
|
||||
if (InfectIsClientInfected(client))
|
||||
@ -662,7 +665,7 @@ ZMarketRebuy(client)
|
||||
}
|
||||
|
||||
new bool:zmarketbuyzone = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]);
|
||||
if (zmarketbuyzone && !ZMarketIsClientInBuyZone(client))
|
||||
if (!rebuy && zmarketbuyzone && !ZMarketIsClientInBuyZone(client))
|
||||
{
|
||||
TranslationPrintToChat(client, "Weapons zmarket buyzone");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user