function reverseTeams() //need far more hacks for this to work correctly. { for (local i = 1; i <= Constants.Server.MAX_PLAYERS; i++) //player loop { local player = PlayerInstanceFromIndex(i); if (player == null) continue; printl("what is " +player); //ignore bots and players already on blue if (IsPlayerABot(player) || (!IsPlayerABot(player) && player.GetTeam() == Constants.ETFTeam.TF_TEAM_PVE_INVADERS) ) { //remove foosteps from players on blue if (!IsPlayerABot(player)) { NetProps.SetPropBool(player, "m_bIsMiniBoss", true); //allows use of "override footstep sound set" player.AddCustomAttribute("override foostep sound set", 0, 0); } return; } //switch red players to blue NetProps.SetPropInt(player, "m_iTeamNum", Constants.ETFTeam.TF_TEAM_PVE_INVADERS); for (local stations; stations = Entities.FindByClassnameWithin(stations, "func_upgradestation", player.GetOrigin(), 32); ) { NetProps.SetPropBool(player, "m_bInUpgradeZone", true); } } }