Hi guys, I have a own menu for changing team in my server and personalized skins, and with instant auto team balance, even with the player models of connor, sometimes some users have T skin on CT side, or CT skin on T side...
I tryed this way to fix it, and it works, but when the server have a lot of players there, sometimes some players overflow...
PHP Code:
public new_round()
{
for(new i; i < 33; i++)
{
if(is_user_connected(i))
{
set_task(3.0, "models", i)
}
}
}
public models(id)
{
if(is_user_connected(id))
{
if ( cs_get_user_team(id) == CS_TEAM_CT) cs_set_user_model(id, "azul_ws")
if ( cs_get_user_team(id) == CS_TEAM_T) cs_set_user_model(id, "vermelho_ws")
}
remove_task(id)
}
Is there a better way to make this? I already tryed with saving the user team in a variable and in the next round if he his in another team, change the skin, but it doesn't work because sometimes the player change team, and instant auto team ballance puts them in the other team again and they will have the skin of the team he changed...
I already tryed to save in a bool if the user was team ballanced but it doesnt work and I dont know why...
__________________