From 9f80f118f7a980edbbf80de8b61de4c2d530d4d2 Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 16 Nov 2026 14:47:58 +0100 Subject: [PATCH] had accidentally removed unsetnextmap, is here again now --- .../scripting/mapchooser_extended_unloze.sp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp index 8a0ce97..64ff972 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp @@ -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 "); + 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();