Fixed auto-rebuy possibly being stuck on if the cvar was disabled. Now auto-disables if the cvar is disabled.
This commit is contained in:
parent
1757ec97fa
commit
ded36a6c5d
|
@ -151,6 +151,13 @@ ZMarketOnClientSpawnPost(client)
|
||||||
// Reset purchase counts for client.
|
// Reset purchase counts for client.
|
||||||
ZMarketResetPurchaseCount(client);
|
ZMarketResetPurchaseCount(client);
|
||||||
|
|
||||||
|
// If auto-rebuy is disabled, then ensure it is also disabled on the client as well.
|
||||||
|
new bool:zmarketrebuyauto = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_REBUY_AUTO]);
|
||||||
|
if (!zmarketrebuyauto)
|
||||||
|
{
|
||||||
|
CookiesSetClientCookieBool(client, g_hZMarketAutoRebuyCookie, false);
|
||||||
|
}
|
||||||
|
|
||||||
// If client hasn't spawned into the game yet, then stop.
|
// If client hasn't spawned into the game yet, then stop.
|
||||||
if (!IsPlayerAlive(client))
|
if (!IsPlayerAlive(client))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user