Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move hardcoded values to config #10

Open
CrazyHackGUT opened this issue Oct 1, 2019 · 0 comments

Comments

@CrazyHackGUT
Copy link

commented Oct 1, 2019

At this moment, LR use hard-coded array for menu for removing/adding player points.

static const char sNumList[][] = {"10", "100", "1000", "-1000", "-100","-10"};
for(int j = 0; j != sizeof(sNumList);)
{
hMenu.AddItem(sID, sNumList[j++]);
}

I suggest move this array to configuration. Create file with name like addons/sourcemod/configs/levels_ranks/menu_points.ini, and fill with content like:

-1000
-100
-10
10
100
1000

Without KeyValues, because this is simple to read with File methodmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.