From 233425e34b5af7d23202b5e2c5064b5499c3dfb6 Mon Sep 17 00:00:00 2001 From: Nordic Warrior Date: Mon, 6 Sep 2021 13:04:43 +0300 Subject: [PATCH 1/2] rtv: show name of last voted player --- cstrike/addons/amxmodx/data/lang/mapmanager.txt | 2 ++ cstrike/addons/amxmodx/scripting/map_manager_rtv.sma | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cstrike/addons/amxmodx/data/lang/mapmanager.txt b/cstrike/addons/amxmodx/data/lang/mapmanager.txt index 9b9409d..2ba655e 100644 --- a/cstrike/addons/amxmodx/data/lang/mapmanager.txt +++ b/cstrike/addons/amxmodx/data/lang/mapmanager.txt @@ -12,6 +12,7 @@ MAPM_NIGHT_NOT_AVAILABLE = Unavailable during^4 night mode^1. MAPM_NIGHT_BLOCK_CMD = This command is not available in night mode! MAPM_RTV_DELAY = You cant vote for rtv. Left:^3 %d:%02d^1. MAPM_RTV_VOTED = %s^1 has voted to change map. Left:^3 %d^1 +MAPM_RTV_VOTED_LAST = %s^1 has voted to change map. All votes for an early map change are in MAPM_RTV_START_VOTE = Starting early voting for next map. MAPM_START_VOTE_NEW_ROUND = Voting will start in next round. MAPM_RTV_ALREADY_VOTED = You have already rocked the vote. Left:^3 %d^1 @@ -69,6 +70,7 @@ MAPM_NIGHT_NOT_AVAILABLE = Недоступно в^4 ночном режиме^1 MAPM_NIGHT_BLOCK_CMD = Команда недоступна в ночном режиме! MAPM_RTV_DELAY = Вы не можете голосовать за досрочную смену карты. Осталось:^3 %d:%02d^1. MAPM_RTV_VOTED = %s^1 проголосовал за смену карты. Осталось:^3 %d^1 +MAPM_RTV_VOTED_LAST = %s^1 проголосовал за смену карты. Все голоса за досрочную смену набраны MAPM_RTV_START_VOTE = Начинаем досрочное голосование. MAPM_START_VOTE_NEW_ROUND = Голосование начнется в следующем раунде. MAPM_RTV_ALREADY_VOTED = Вы уже голосовали. Осталось:^3 %d^1 diff --git a/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma b/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma index 1fa5ad9..00439cc 100644 --- a/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma +++ b/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma @@ -95,13 +95,18 @@ public clcmd_rtv(id) if(need_votes <= 0) { map_scheduler_start_vote(VOTE_BY_RTV); - return PLUGIN_HANDLED; } if(!g_bVoted[id]) { g_bVoted[id] = true; new name[32]; get_user_name(id, name, charsmax(name)); - client_print_color(0, print_team_default, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED", name, need_votes); + + if(need_votes <= 0) { + client_print_color(0, print_team_default, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED_LAST", name); + } + else { + client_print_color(0, print_team_default, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED", name, need_votes); + } } else { client_print_color(id, print_team_default, "%s^1 %L.", g_sPrefix, id, "MAPM_RTV_ALREADY_VOTED", need_votes); } From c388d9ea8f2091421e16fd8b5b5ea817d1134e5d Mon Sep 17 00:00:00 2001 From: Nordic Warrior Date: Tue, 7 Sep 2021 20:51:36 +0300 Subject: [PATCH 2/2] rtv: color of message depend of player's team --- cstrike/addons/amxmodx/scripting/map_manager_rtv.sma | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma b/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma index 00439cc..73dd1a1 100644 --- a/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma +++ b/cstrike/addons/amxmodx/scripting/map_manager_rtv.sma @@ -102,10 +102,10 @@ public clcmd_rtv(id) new name[32]; get_user_name(id, name, charsmax(name)); if(need_votes <= 0) { - client_print_color(0, print_team_default, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED_LAST", name); + client_print_color(0, id, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED_LAST", name); } else { - client_print_color(0, print_team_default, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED", name, need_votes); + client_print_color(0, id, "%s^3 %L.", g_sPrefix, LANG_PLAYER, "MAPM_RTV_VOTED", name, need_votes); } } else { client_print_color(id, print_team_default, "%s^1 %L.", g_sPrefix, id, "MAPM_RTV_ALREADY_VOTED", need_votes);