Hi, Wondering about auto team swapping after every round?

Hi, I’m an admin on an Aussie/NZ Prop Hunt server. It’s a little frustrating playing the game and not swapping between prop/hunter teams after every round. Would anyone mind lending a helping hand and share some knowledge on this subject?

To clarify: I’d like to know how to make the teams force swap after every round.

Also, Prop Hunt is running the fretta map voting system and it’s completely borked on GMod 13. Any alternatives?


I don’t often work with gamemodes, but I should imagine you could simply loop through all players at the end of each round/start of another and change their team before spawning. Something like this:

--Some function called at the start of a match
for _,pl in pairs(player.GetAll()) do
    if pl:Team() == TEAM_ONE then
    pl:Spawn() -- This will be necessary if players have already spawned.

Hiya, thanks for the response!

I’ve been informed that the team swap bug is due to fretta being borked… We’ve taken on a different map voting system, although we’ll probably have to wait until the author comes out with an update before the team swap bug can be fixed…