had accidentally removed unsetnextmap, is here again now

This commit is contained in:
jenz
2026-11-16 14:47:58 +01:00
parent 6c6b577c2c
commit 9f80f118f7
@@ -348,6 +348,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.");
@@ -896,6 +897,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();