From fefad5ce8ab33e6f4111304f298f9d00bce2419e Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 18 Jun 2026 13:48:25 +0200 Subject: [PATCH] now having 3 map nominations as a tier perk --- .../scripting/mapchooser_extended_unloze.sp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp index 8f53cb8..c7e4af7 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp @@ -171,6 +171,7 @@ ConVar g_Cvar_ShufflePerClient; ConVar g_Cvar_NoRestrictionTimeframeEnable; ConVar g_Cvar_NoRestrictionTimeframeMinTime; ConVar g_Cvar_NoRestrictionTimeframeMaxTime; +ConVar g_Cvar_MultipleNominationsTier; /* Mapchooser Extended Data Handles */ Handle g_OfficialList = INVALID_HANDLE; @@ -318,6 +319,7 @@ public void OnPluginStart() g_Cvar_NoRestrictionTimeframeEnable = CreateConVar("mce_no_restriction_timeframe_enable", "1", "Enable timeframe where all nomination restrictions and cooldowns are disabled?", _, true, 0.0, true, 1.0); g_Cvar_NoRestrictionTimeframeMinTime = CreateConVar("mce_no_restriction_timeframe_mintime", "0100", "Start of the timeframe where all nomination restrictions and cooldowns are disabled (Format: HHMM)", _, true, 0000.0, true, 2359.0); g_Cvar_NoRestrictionTimeframeMaxTime = CreateConVar("mce_no_restriction_timeframe_maxtime", "0700", "End of the timeframe where all nomination restrictions and cooldowns are disabled (Format: HHMM)", _, true, 0000.0, true, 2359.0); + g_Cvar_MultipleNominationsTier = CreateConVar("mce_multiple_nominations_tier", "3", "Tier required for having multiple nominations available."); 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 "); @@ -2208,8 +2210,12 @@ NominateResult InternalNominateMap(char[] map, int owner) /* Look to replace an existing nomination by this client - Nominations made with owner = 0 arent replaced */ //2023 edit: change clients first nomination out of the clients multiple nominations, make a check if client filled all his nomination slots - //currently hard coded to 3 maps, just add a cvar to replace it with in the future - if(owner && GetArraySize(g_NominateList[owner]) > 2) + //2026 edit: using tier to determine if 3 nominations or just 1 + int tier_required = GetConVarInt(g_Cvar_MultipleNominationsTier); + int client_tier = GetPlayerTier_native(owner); + int nom_capacity = tier_required > client_tier ? 0 : 2; //1 nomination or 3 nominations. + + if(owner && GetArraySize(g_NominateList[owner]) > nom_capacity) { char oldmap[PLATFORM_MAX_PATH]; GetArrayString(g_NominateList[owner], 0, oldmap, PLATFORM_MAX_PATH);