Lua:SetTeamPlayerLimit

From Fortress Forever Wiki
Revision as of 12:17, 19 June 2006 by Mulchman MM (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

SetTeamPlayerLimit

SetTeamPlayerLimit is used to set what teams are allowed. It must be placed in your map's startup() function and gets passed 2 parameters:

SetTeamPlayerLimit( team, limit )
team  - team to set limits on
limit - how many are allowed (0 = valid team, -1 = invalid team)

In this example, we will make red and blue be the only allowed teams:

Example .LUA startup() function

function startup()
     -- set up team limits (only red & blue)
     SetTeamPlayerLimit( BLUE_TEAM, 0 )
     SetTeamPlayerLimit( RED_TEAM, 0 )
     SetTeamPlayerLimit( YELLOW_TEAM, -1 )
     SetTeamPlayerLimit( GREEN_TEAM, -1 )
end