Closed WhyFaust closed 4 years ago
Fixed, thanks for telling me.
Simply changing the version will fix the problem?)). Well, the binary is probably normal, I guess.
You do not need to change anything besides version, correct.
I mean, you've only changed the version of the commits and the rest of the code isn't xD.
AAAAAAAH you are right, I forgot to drag the other folder in.
edit: here it is https://github.com/NotJustin/SkillAutoBalance/commit/b08b651c65f92752c1c76f60609a3f5a007ac490
The numbers before were backward even though it "looked" correct. Now, the numbers are correct but they look backward. It works. It is just ugly. I will change it later to make more sense.
By the way, now the game, which has a point 1 drag when connecting to the spectators, because of this there are small problems on the server, as I have a maximum of 2 spectators, and if I go ahead and they will throw for the spectators(take all seats), then I'm thrown for the team, although I have an auto-connection for the spectator.
I didn't quite understand what I wrote myself. I'll write it more clearly: All in all. The player has a 100% auto-connection per team (not spectator) in the settings, because I have a blocked command sm_settings. But they are still thrown when you connect for spectators, I do not know what it has to do with. Because of that I can't connect to the spectators myself, because the command is full.
The plugin creates a cookie for each client when they join your server for the first time. It is never assigned a value unless they pick something in settings. You blocked that option, so they should not be able to set their cookie. All of these players have empty cookie values. When it is empty, I set it so their preference by default is to join spectator.
You want this to put them on a team by default instead? Maybe I can add a convar to allow you to set the default value of the cookie.
For now, it is in here "SkillAutoBalance/funcs_public.sp"
public void OnClientCookiesCached(int client)
{
char buffer[24];
GetClientCookie(client, g_hForceSpawn, buffer, sizeof(buffer));
// 0 is spectate, 1 is join a team
if (strlen(buffer) > 0)
{
g_iClientForceJoinPreference[client] = StringToInt(buffer);
}
else
{
//this puts them in spectate. Change to 1 to put them on a team. Maybe I replace this with a convar instead.
g_iClientForceJoinPreference[client] = 0;
}
}
Did I understand correctly? If I did, I am confused. If you disable settings, why not set sab_forcejointeam 2
so that it does not use cookies?
The other thing you might be saying is, you want them to be put on UNASSIGNED team so they don't fill spectator slots? If so, I do not like that idea (in my experience, it is very confusing for players)
Ahh... Yeah, well, I'd like the default value to be 1, not the spectators. I just don't get it, because when someone writes !settings, they have the default value of the first item on, and the second item(s) is off. That's why I said so. I put a value of 1 in the config and block the command only to be personally thrown by spectators, because I join my server and minimize the game to work in filezilla or elsewhere. Well, it would be really more logical for the default value to be 1 instead of 0.
That is likely my mistake, I rushed this implementation originally. I will rework this later.
As the name implies, it does not automatically connect for the observer command when it is set in !settings. cfg file: