diff --git a/mapchooser_extended/scripting/mapchooser_extended.sp b/mapchooser_extended/scripting/mapchooser_extended.sp index 0af06bbb..eb9ea5bf 100644 --- a/mapchooser_extended/scripting/mapchooser_extended.sp +++ b/mapchooser_extended/scripting/mapchooser_extended.sp @@ -2594,6 +2594,7 @@ stock int FindIntInArray(int[] array, int size, int value) return -1; } + stock void InternalRestoreMapCooldowns() { char sCooldownFile[PLATFORM_MAX_PATH]; @@ -2632,7 +2633,7 @@ stock void InternalRestoreMapCooldowns() return; } - if((Cooldown = Cooldowns.GetNum("cd", -1)) > 0) + if((Cooldown = Cooldowns.GetNum("Cooldown", -1)) > 0) { LogMessage("Restored cooldown: %s -> %d", map, Cooldown); g_OldMapList.SetValue(map, Cooldown, true); @@ -2654,31 +2655,6 @@ stock void InternalStoreMapCooldowns() } KeyValues Cooldowns = new KeyValues("mapchooser_extended"); - if(!Cooldowns.ImportFromFile(sCooldownFile)) - { - LogMessage("Unable to import cooldown file: \"%s\"", sCooldownFile); - delete Cooldowns; - return; - } - Cooldowns.Rewind(); - if (Cooldowns.GotoFirstSubKey()) - { - for (;;) - { - if (Cooldowns.DeleteThis() < 1) - break; - } - - if(!Cooldowns.ExportToFile(sCooldownFile)) - { - LogMessage("Unable to export cooldown file: \"%s\"", sCooldownFile); - delete Cooldowns; - return; - } - } - delete Cooldowns; - - Cooldowns = new KeyValues("mapchooser_extended"); Cooldowns.Rewind(); int Cooldown; char map[PLATFORM_MAX_PATH]; @@ -2696,7 +2672,7 @@ stock void InternalStoreMapCooldowns() delete OldMapListSnapshot; return; } - Cooldowns.SetNum("cd", Cooldown); + Cooldowns.SetNum("Cooldown", Cooldown); Cooldowns.Rewind(); } diff --git a/mapchooser_extended/scripting/nominations_extended.sp b/mapchooser_extended/scripting/nominations_extended.sp index 6f9c40e3..7d09db00 100644 --- a/mapchooser_extended/scripting/nominations_extended.sp +++ b/mapchooser_extended/scripting/nominations_extended.sp @@ -566,14 +566,30 @@ public Action Command_NominateList(int client, int args) GetNominatedMapList(MapList); if(!GetArraySize(MapList)) { - CPrintToChat(client, "[NE] No maps have been nominated."); + ReplyToCommand(client, "[NE] No maps have been nominated."); + delete MapList; + return Plugin_Handled; + } + + static char map[PLATFORM_MAX_PATH]; + + if (client == 0) + { + char aBuf[2048]; + StrCat(aBuf, sizeof(aBuf), "[NE] Nominated Maps:"); + for(int i = 0; i < GetArraySize(MapList); i++) + { + StrCat(aBuf, sizeof(aBuf), "\n"); + GetArrayString(MapList, i, map, sizeof(map)); + StrCat(aBuf, sizeof(aBuf), map); + } + ReplyToCommand(client, aBuf); delete MapList; return Plugin_Handled; } Handle NominateListMenu = CreateMenu(Handler_NominateListMenu, MENU_ACTIONS_DEFAULT|MenuAction_DisplayItem); - static char map[PLATFORM_MAX_PATH]; for(int i = 0; i < GetArraySize(MapList); i++) { GetArrayString(MapList, i, map, sizeof(map));