Alright, I need a function that runs when a player’s team is changed.
If I where to go [lua]ply:SetTeam(2)[/lua] It would have to run.
I have tried various functions like [lua]function GM:OnPlayerChangedTeam( ply, oldteam, newteam )[/lua][lua]function GM:PlayerJoinTeam( ply, teamid )[/lua]I also tried this one, which probably wouldn’t work seeing as it only runs when the player uses the changeteam command. Still gave it a shot though.
[lua]function GM:PlayerRequestTeam( ply, teamid )[/lua]
For some reason none of these run when I do that, although a couple run when I use the changeteam command. So do I need to change the player’s team in a different way? Why do you think this doesn’t work?