Skip to content

Conversation

@mbhound
Copy link

@mbhound mbhound commented Mar 18, 2020

No description provided.

g_hEnhancedMenu.AddItem("Alphabetic", "Alphabetic");

for( int i = 0; i <= 10; ++i )
for(int i = GetConVarInt(g_cvMinTier); i <= GetConVarInt(g_cvMaxTier); ++i)
Copy link
Owner

Choose a reason for hiding this comment

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

Replace all GetConvarInt with convar.IntValue


void OpenNominateMenuTier(int client, int tier)
{
DisplayMenu(g_aTierMenus.Get(tier-GetConVarInt(g_cvMinTier)), client, MENU_TIME_FOREVER);
Copy link
Owner

Choose a reason for hiding this comment

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

user the Display method instead of function

else if (action == MenuAction_End)
{
if (menu != g_hNominateMenu && menu != INVALID_HANDLE)
if (menu != g_hNominateMenu && menu != INVALID_HANDLE && FindValueInArray(g_aTierMenus, menu) == -1)
Copy link
Owner

Choose a reason for hiding this comment

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

Use Find method


g_cvMinTier = CreateConVar("smc_min_tier", "0", "The minimum tier to show on the enhanced menu", _, true, 0.0, true, 10.0);
g_cvMaxTier = CreateConVar("smc_max_tier", "10", "The maximum tier to show on the enhanced menu", _, true, 0.0, true, 10.0);

Copy link
Owner

Choose a reason for hiding this comment

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

Should probably add a sanity check so that people don't put a max of 5 and a min of 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants