mirror of
https://codeberg.org/spire/setteam.git
synced 2026-06-03 22:34:07 +02:00
clear forceteam on (dis)connect
This commit is contained in:
parent
bb66af7181
commit
3977bab1b7
2 changed files with 10 additions and 1 deletions
Binary file not shown.
|
|
@ -17,6 +17,7 @@ public OnPluginStart() {
|
||||||
RegServerCmd("sm_forceteam", ForceExec, "Set a players team and keep them there");
|
RegServerCmd("sm_forceteam", ForceExec, "Set a players team and keep them there");
|
||||||
|
|
||||||
AddCommandListener(Command_JoinTeam, "jointeam");
|
AddCommandListener(Command_JoinTeam, "jointeam");
|
||||||
|
AddCommandListener(Command_JoinTeam, "autoteam");
|
||||||
}
|
}
|
||||||
|
|
||||||
int parse_team(const char[] team_str) {
|
int parse_team(const char[] team_str) {
|
||||||
|
|
@ -98,3 +99,11 @@ public Action:Command_JoinTeam(client, const String:command[], argc) {
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnClientConnected(client) {
|
||||||
|
force_team[client] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClientDisconnect(client) {
|
||||||
|
force_team[client] = 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue