Any help would be apriciated so close to working
PHP Code:
public round_end()
{
if(g_rounds >= get_pcvar_num(g_match_rounds))
{
set_cvar_num("fmatch_ratio", 10)
server_cmd("sv_restart");
}
{
check_teams();
}
}
this testing on 1v1 humans wa working , but dont know yet if the server will handle 10 players, the other method was caussing a overflow on the console
also
PHP Code:
public round_start()
{
if(!get_pcvar_num(g_cvar_enable))
return;
new ratio = clamp(get_pcvar_num(g_cvar_ratio), 1, floatround(Float:(g_iMaxplayers/2.0), floatround_floor))
new cnum, tnum, players[32];
get_players(players, cnum, "he", "CT")
get_players(players, tnum, "he", "TERRORIST")
if((ratio*2) > (cnum+tnum))
{
check_teams();
return;
}
else if(!((ratio == cnum) && (ratio == tnum)))
{
//server_cmd("sv_restart 3")
}
check_ratio()
// counting rounds..
g_rounds++;
}
This is what i think is causing a subbed player (a player that has swapped places with a player in a current match) make the game restart/reset rounds before its time to swap.
so i just blocked it out //
but not sure if it will affect anything else.
So far it was not restarting the game when team check happens at the start of the round, before it would restart game if teams are unbalanced an round checked at the start of every round.