This repository has been archived on 2024-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-xlabs/clients/s1x/data/scripts/_team_balance.gsc

24 lines
428 B
Plaintext
Raw Normal View History

2023-08-13 16:46:26 -04:00
init()
{
// define onteamselection callback function used in balanceteams()
level.onteamselection = ::set_team;
}
set_team(team)
{
if (team != self.pers["team"])
{
self.switching_teams = true;
self.joining_team = team;
self.leaving_team = self.pers["team"];
}
if (self.sessionstate == "playing")
{
self suicide();
}
maps\mp\gametypes\_menus::addtoteam(team);
maps\mp\gametypes\_menus::endrespawnnotify();
}