Skip to content

Commit

Permalink
Add missing flag check
Browse files Browse the repository at this point in the history
  • Loading branch information
Bara committed May 15, 2019
1 parent 03b184d commit cdea70f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons/sourcemod/scripting/ttt/ttt_shop_discount.sp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ public Action TTT_OnItemPurchase(int client, int &price, bool &count, const char
{
if (TTT_IsClientValid(client) && IsPlayerAlive(client))
{
char sFlag[16];
g_smFlag.GetString(sItem, sFlag, sizeof(sFlag));

if (strlen(sFlag) > 0 && !HasFlags(client, sFlag))
{
return Plugin_Continue;
}

int iPercent = 0;
if (g_smPercent.GetValue(sItem, iPercent))
{
Expand Down

0 comments on commit cdea70f

Please sign in to comment.