lots of changes

This commit is contained in:
2026-10-22 16:17:56 +01:00
parent e4a75367aa
commit ac3ffd5be2
53 changed files with 7716 additions and 193 deletions
@@ -342,6 +342,7 @@ public void OnPluginStart()
RegAdminCmd("sm_mapvote", Command_Mapvote, ADMFLAG_CHANGEMAP, "sm_mapvote - Forces MapChooser to attempt to run a map vote now.");
RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_CHANGEMAP, "sm_setnextmap <map>");
RegAdminCmd("sm_unsetnextmap", Command_UnsetNextmap, ADMFLAG_CHANGEMAP, "sm_unsetnextmap - Unsets an admin-set next map and re-enables the end of map vote.");
// Mapchooser Extended Commands
RegAdminCmd("mce_reload_maplist", Command_ReloadMaps, ADMFLAG_CHANGEMAP, "mce_reload_maplist - Reload the Official Maplist file.");
@@ -885,6 +886,23 @@ public Action Command_SetNextmap(int client, int args)
return Plugin_Handled;
}
public Action Command_UnsetNextmap(int client, int args)
{
if(g_iNextmapState != 2)
{
CReplyToCommand(client, "[MCE] No admin-set next map to unset.");
return Plugin_Handled;
}
g_iNextmapState = 0;
g_MapVoteCompleted = false;
FindConVar("sm_nextmap").SetString("");
ShowActivity(client, "unset the next map");
LogAction(client, -1, "\"%L\" unset the nextmap", client);
return Plugin_Handled;
}
public Action Command_ReloadMaps(int client, int args)
{
InitializeOfficialMapList();