Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Equip manager: Give default: AK47, DEagle (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyShorokhov authored Nov 24, 2021
1 parent dba501e commit 318d109
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ enum EquipMenu_s

new HookChain:g_hGiveDefaultItems, HookChain:g_hBuyWeaponByWeaponID, HookChain:g_hHasRestrictItem
new Array:g_aArrays[arraylist_e], Trie:g_tCheckItemName
new g_iPreviousSecondary[MAX_CLIENTS + 1], g_iPreviousPrimary[MAX_CLIENTS + 1], bool:g_bOpenMenu[MAX_CLIENTS + 1], bool:g_bAlwaysRandom[MAX_CLIENTS + 1]
new g_iPreviousSecondary[MAX_CLIENTS + 1] = { 2, ... }, g_iPreviousPrimary[MAX_CLIENTS + 1] = { 1, ... }, bool:g_bOpenMenu[MAX_CLIENTS + 1], bool:g_bAlwaysRandom[MAX_CLIENTS + 1]
new Float:g_flPlayerBuyTime[MAX_CLIENTS + 1]

new g_iSecondarySection, g_iPrimarySection, g_iBotSecondarySection, g_iBotPrimarySection
Expand Down Expand Up @@ -180,8 +180,9 @@ public CSDM_RestartRound(const bool:bNewGame)

public client_putinserver(pPlayer)
{
g_iPreviousSecondary[pPlayer] = g_iPreviousPrimary[pPlayer] = INVALID_INDEX
g_bOpenMenu[pPlayer] = true
g_iPreviousSecondary[pPlayer] = 2
g_iPreviousPrimary[pPlayer] = 1
g_bOpenMenu[pPlayer] = false
g_bAlwaysRandom[pPlayer] = false
g_flPlayerBuyTime[pPlayer] = 0.0
}
Expand Down Expand Up @@ -236,7 +237,7 @@ public CSDM_PlayerSpawned(const pPlayer, const bool:bIsBot, const iNumSpawns)
{
MenuShow_EquipMenu(pPlayer)
}

if(!g_bAlwaysRandom[pPlayer])
{
PreviousWeapons(pPlayer, g_aArrays[Secondary], g_iPreviousSecondary[pPlayer])
Expand Down Expand Up @@ -360,7 +361,7 @@ public MenuHandler_EquipMenu(const pPlayer, const menu, const item) {
client_print_color(pPlayer, print_team_grey, "^4[CSDM] %L", pPlayer, "CHAT_HELP_GUNS")
g_bOpenMenu[pPlayer] = false
g_bAlwaysRandom[pPlayer] = true
}
}
}

return PLUGIN_HANDLED
Expand Down

1 comment on commit 318d109

@stambeto2006
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wopox1337 Now the weapons menu is not displayed and it only launches me by logging in to the server with ak47 w/o pistols?

Please sign in to comment.