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

Search arenas by partial name #9

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified addons/sourcemod/plugins/mge.smx
Binary file not shown.
15 changes: 5 additions & 10 deletions addons/sourcemod/scripting/mge.sp
Original file line number Diff line number Diff line change
Expand Up @@ -2991,22 +2991,17 @@ public Action Command_Menu(int client, int args)

// Was the argument an arena name?
GetCmdArgString(sArg, sizeof(sArg));
int count;
int found_arena;
for (int i = 1; i <= g_iArenaCount; i++)
for(int i = 1; i <= g_iArenaCount; i++)
{
if (StrContains(g_sArenaName[i], sArg, false) >= 0)
if(StrContains(g_sArenaName[i], sArg, false) >= 0)
{
count++;
found_arena = i;
if (count > 1)
{
ShowMainMenu(client);
return Plugin_Handled;
if (g_iArenaStatus[i] == AS_IDLE) {
found_arena = i;
break;
}
}
}

// If there was only one string match, and it was a valid match, place the player in that arena if they aren't already in it.
if (found_arena > 0 && found_arena <= g_iArenaCount && found_arena != g_iPlayerArena[client])
{
Expand Down