Skip to content

Commit

Permalink
Fixed grenade buy limit count
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn committed Jan 27, 2024
1 parent b5d282b commit 8b74358
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MatchBot/MatchRestrictItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool CMatchRestrictItem::PlayerHasRestrictItem(CBasePlayer* Player, ItemID item,
if (gMatchBot.m_RoundGrenadeCount->value > 0.0f)
{
// Increment and check limit
if (Player->m_rgItems[0]++ > static_cast<int>(gMatchBot.m_RoundGrenadeCount->value))
if (Player->m_rgItems[0]++ >= static_cast<int>(gMatchBot.m_RoundGrenadeCount->value))
{
// Send blocked message
gMatchUtil.ClientPrint(Player->edict(), PRINT_CENTER, "#Cstrike_TitlesTXT_Weapon_Not_Available");
Expand All @@ -89,7 +89,7 @@ bool CMatchRestrictItem::PlayerHasRestrictItem(CBasePlayer* Player, ItemID item,
if (gMatchBot.m_RoundSmokeCount->value > 0.0f)
{
// Increment and check limit
if (Player->m_rgItems[1]++ > static_cast<int>(gMatchBot.m_RoundSmokeCount->value))
if (Player->m_rgItems[1]++ >= static_cast<int>(gMatchBot.m_RoundSmokeCount->value))
{
// Send blocked message
gMatchUtil.ClientPrint(Player->edict(), PRINT_CENTER, "#Cstrike_TitlesTXT_Weapon_Not_Available");
Expand All @@ -107,7 +107,7 @@ bool CMatchRestrictItem::PlayerHasRestrictItem(CBasePlayer* Player, ItemID item,
if (gMatchBot.m_RoundSmokeCount->value > 0.0f)
{
// Increment and check limit
if (Player->m_rgItems[2]++ > static_cast<int>(gMatchBot.m_RoundFlashCount->value))
if (Player->m_rgItems[2]++ >= static_cast<int>(gMatchBot.m_RoundFlashCount->value))
{
// Send blocked message
gMatchUtil.ClientPrint(Player->edict(), PRINT_CENTER, "#Cstrike_TitlesTXT_Weapon_Not_Available");
Expand Down

0 comments on commit 8b74358

Please sign in to comment.