the only part that is screwing up is this
Code:
}
public vote_teams() {
new menu_msg[256]
format(menu_msg,255,"\yTeam type?")
add(menu_msg,255,"^n^n\y1.\w Leave normal")
add(menu_msg,255,"^n\y2.\w Random")
new Float:votetime = get_cvar_float("pug_vote_time") + 10.0
set_cvar_float("pug_last_voting", get_gametime() + votetime)
show_menu(0,(1<<0)|(1<<1),menu_msg,floatround(votetime),"Team")
set_task(votetime,"check_teamvotes",task_teamvote)
showsay(0,v_team_started)
//client_print(0,print_chat,v_team_started)
teamchoice[0]=teamchoice[1]=0
return PLUGIN_CONTINUE
}
public count_teamvotes(id,key) {
if(get_cvar_num("pug_vote_answers")==1) {
new player_name[32]
get_user_name(id,player_name,31)
client_print(0,print_chat,"%s voted for %s",player_name,key ?"random teams":"leaving normal")
}
++teamchoice[key]
return PLUGIN_HANDLED
}
public check_teamvotes() {
new ms[300]
if(teamchoice[0] > teamchoice[1]) {
format(ms,299,v_normal_succes,teamchoice[0])
showsay(0,ms)
//client_print(0,print_chat,v_normal_succes, teamchoice[0])
roundcount=0
ct_score=0
t_score=0
swap_teams=0
pug_fase=1
pug_start_fase=1
set_task(2.0,"start_pug",task_start)
} else {
format(ms,299,v_random_succes,teamchoice[1])
showsay(0,ms)
//client_print(0,print_chat,v_random_succes, teamchoice[1])
set_task(1.0,"shuffle_teams",task_shuffle)
}
return PLUGIN_HANDLED
__________________