mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 14:58:06 +03:00
checks if the none option is the majority vote
This commit is contained in:
parent
935da9f0de
commit
fe0e461c76
@ -83,12 +83,21 @@ public plugin_init()
|
|||||||
|
|
||||||
public checkVotes()
|
public checkVotes()
|
||||||
{
|
{
|
||||||
new b = 0
|
new b = 0, smap[32]
|
||||||
|
|
||||||
for (new a = 0; a < g_mapVoteNum; ++a)
|
for (new a = 0; a < g_mapVoteNum; ++a)
|
||||||
if (g_voteCount[b] < g_voteCount[a])
|
if (g_voteCount[b] < g_voteCount[a])
|
||||||
b = a
|
b = a
|
||||||
|
|
||||||
|
if (g_voteCount[SELECTMAPS] == g_voteCount[b])
|
||||||
|
{
|
||||||
|
get_cvar_string("amx_nextmap", smap, 31)
|
||||||
|
client_print(0, print_chat, "%L", LANG_PLAYER, "CHO_FIN_NEXT", smap)
|
||||||
|
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s", smap)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (g_voteCount[SELECTMAPS] > g_voteCount[b])
|
if (g_voteCount[SELECTMAPS] > g_voteCount[b])
|
||||||
{
|
{
|
||||||
new mapname[32]
|
new mapname[32]
|
||||||
@ -105,8 +114,6 @@ public checkVotes()
|
|||||||
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
|
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
|
||||||
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]])
|
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]])
|
||||||
|
|
||||||
new smap[32]
|
|
||||||
|
|
||||||
get_cvar_string("amx_nextmap", smap, 31)
|
get_cvar_string("amx_nextmap", smap, 31)
|
||||||
client_print(0, print_chat, "%L", LANG_PLAYER, "CHO_FIN_NEXT", smap)
|
client_print(0, print_chat, "%L", LANG_PLAYER, "CHO_FIN_NEXT", smap)
|
||||||
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s", smap)
|
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s", smap)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user