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