Code: Select all
if(g_bIsVotingFor[speed])
{
if(g_iVotes[0] > g_iVotes[1] && g_iVotes[0] > g_iVotes[2] && g_iVotes[0] > g_iVotes[3])
{
client_print_color(0, 0, "%s Votul a luat final. Rezultat:^4 300 VITEZA^1.", TAG)
menu_destroy(g_speed_menu)
speed_value = 1
g_voting = 0
}
if(g_iVotes[1] > g_iVotes[0] && g_iVotes[1] > g_iVotes[2] && g_iVotes[1] > g_iVotes[3])
{
client_print_color(0, 0, "%s Votul a luat final. Rezultat:^4 350 VITEZA^1.", TAG)
menu_destroy(g_speed_menu)
speed_value = 2
g_voting = 0
}
if(g_iVotes[2] > g_iVotes[0] && g_iVotes[2] > g_iVotes[1] && g_iVotes[2] > g_iVotes[3])
{
client_print_color(0, 0, "%s Votul a luat final. Rezultat:^4 400 VITEZA^1.", TAG)
menu_destroy(g_speed_menu)
speed_value = 3
g_voting = 0
}
if(g_iVotes[3] > g_iVotes[0] && g_iVotes[3] > g_iVotes[1] && g_iVotes[3] > g_iVotes[1])
{
client_print_color(0, 0, "%s Votul a luat final. Rezultat:^4 VITEZA NORMALA^1.", TAG)
menu_destroy(g_speed_menu)
speed_value = 0
g_voting = 0
}
else
{
client_print_color(0, 0, "%s Votul a luat final. Rezultat:^4 REVOTE^1.", TAG)
menu_destroy(g_speed_menu)
vote_for_speed(id)
speed_value = 0
g_voting = 0
}
}
Tinand cont ca g_iVotes o sa fie mereu egala cu cv