• Allowing only a certian amount of players to a team?
    4 replies, posted
Does anyone happen to know of a function that limits the amount of players per team, I remember seeing something like this a while ago but I can't find it now. If someone could also give me a example that would be great.
[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerCanJoinTeam]Gamemode.PlayerCanJoinTeam [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] This may be useful.
Can someone help me with my code? I can still join team 2 and I don't get any errors. [LUA] function GM:PlayerCanJoinTeam( ply, team ) if team.NumberPlayers( 2 ) >= 0 then team.Joinable( 2 ) return false end end [/LUA]
Ah, I didn't know that. Thanks for the help!
Sorry, you need to Log In to post a reply to this thread.