clear forceteam on (dis)connect

This commit is contained in:
Robin Appelman 2020-03-29 22:25:22 +02:00
commit 3977bab1b7
2 changed files with 10 additions and 1 deletions

View file

@ -17,6 +17,7 @@ public OnPluginStart() {
RegServerCmd("sm_forceteam", ForceExec, "Set a players team and keep them there");
AddCommandListener(Command_JoinTeam, "jointeam");
AddCommandListener(Command_JoinTeam, "autoteam");
}
int parse_team(const char[] team_str) {
@ -97,4 +98,12 @@ public Action:Command_JoinTeam(client, const String:command[], argc) {
} else {
return Plugin_Continue;
}
}
}
public void OnClientConnected(client) {
force_team[client] = 0;
}
public void OnClientDisconnect(client) {
force_team[client] = 0;
}