Ultra Posted November 26, 2016 Share Posted November 26, 2016 Hey there.. Is there anyway to limit the maximum amount of people in one team? Like if I have a CMD for example /police to join PD.. how can I make it so they can't join PD if 5 people are already in PD? Thanks <3 Link to comment
Captain Cody Posted November 26, 2016 Share Posted November 26, 2016 max = 5 function setTeamPolice(player) local police = getTeamFromName("police") if #getPlayersInTeam(police) < max+1 then setPlayerTeam(player,police) end end addCommandHandler("police",setTeamPolice) 2 Link to comment
Tails Posted November 27, 2016 Share Posted November 27, 2016 " < max+1 " lol Use <= 2 Link to comment
Captain Cody Posted November 27, 2016 Share Posted November 27, 2016 I'm tired forgive me. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now