From 41977d77db4d54654aa82b05c701b0f40fcebdd0 Mon Sep 17 00:00:00 2001 From: neon <> Date: Mon, 3 Sep 2018 20:59:08 +0200 Subject: [PATCH] nominations_extended: made nomlist work through rcon --- .../scripting/nominations_extended.sp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mapchooser_extended/scripting/nominations_extended.sp b/mapchooser_extended/scripting/nominations_extended.sp index 6f9c40e3..42684097 100644 --- a/mapchooser_extended/scripting/nominations_extended.sp +++ b/mapchooser_extended/scripting/nominations_extended.sp @@ -566,14 +566,28 @@ 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); + } + 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));