Hi, I want to know how I can limit how many people can be in a class depending on the size of other classes. Prime Example: Secret Service based on Mayor.
function TeamMax() if team.NumPlayers( TEAM_MAYOR ) == 0 then Set the SS team max to 0. end if team.NumPlayers( TEAM_MAYOR ) == 1 then Set the SS team max to 2. end end hook.Add( Not sure what hook to use. )
That is how I would imagine it would go. I could, very likely, be wrong in my approach. If someone knows what to do or has done something like this, please teach me! Thanks!