From 63427b2ad06143e7230a735383f5a9283553d5fe Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Fri, 13 Apr 2007 18:43:36 +0000 Subject: [PATCH] Added amb51 - 4 options in amx_vote Also fixed a potential formatting issue with the vote display. --- plugins/adminvote.sma | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/plugins/adminvote.sma b/plugins/adminvote.sma index e37575b5..50f06a52 100755 --- a/plugins/adminvote.sma +++ b/plugins/adminvote.sma @@ -35,6 +35,7 @@ #include #include + new g_Answer[128] new g_optionName[4][64] new g_voteCount[4] @@ -58,7 +59,7 @@ public plugin_init() register_menucmd(register_menuid("Choose map: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount") register_menucmd(register_menuid("Kick "), MENU_KEY_1|MENU_KEY_2, "voteCount") register_menucmd(register_menuid("Ban "), MENU_KEY_1|MENU_KEY_2, "voteCount") - register_menucmd(register_menuid("Vote: "), MENU_KEY_1|MENU_KEY_2, "voteCount") + register_menucmd(register_menuid("Vote: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount") register_menucmd(register_menuid("The result: "), MENU_KEY_1|MENU_KEY_2, "actionResult") register_concmd("amx_votemap", "cmdVoteMap", ADMIN_VOTE, " [map] [map] [map]") register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_VOTE, "") @@ -372,8 +373,12 @@ public cmdVote(id, level, cid) return PLUGIN_HANDLED } - read_argv(2, g_optionName[0], 31) - read_argv(3, g_optionName[1], 31) + new count=read_argc(); + server_print("count==%d",count); + for (new i=0;i<4 && (i+2)4) + { + count=4; + } + // count now shows how many options were listed + new keys=0; + for (new i=0;i