Garry's Mod

Garry's Mod

Murder
ThatCrazyGuy Jun 26, 2015 @ 6:20pm
mu_jointeam problems
Hi there,

I've been trying to create a bind that allows you to toggle between spectators and players, but i'm having trouble gettting toggle between the two.

So far it changes them to the spectator or player when pressed, but it doesn't change them back to the other team when it's pressed again.

Here's the code I've written up.
function ChangeTeam( ply ) if ply:Team(2) then ply:ConCommand( "mu_jointeam 1" ) elseif ply:Team(1) then ply:ConCommand( "mu_jointeam 2" ) end end hook.Add("ShowTeam", "ChangeTeam", ChangeTeam)

Any help with this would be greatly appreciated!

Thanks :D
< >
Showing 1-2 of 2 comments
Mechanical Mind  [developer] Jun 28, 2015 @ 8:59pm 
ply:Team() == 2 instead of ply:Team(2)
ThatCrazyGuy Jun 29, 2015 @ 8:23am 
Ok thanks man. :D
< >
Showing 1-2 of 2 comments
Per page: 1530 50