CreateTeam

From Multi Theft Auto: Wiki
Revision as of 15:16, 30 June 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is for creating a new team, which can be used to group players.

Syntax

team createTeam ( string teamName )

Required Arguments

  • teamName: A string representing the teams name.

Returns

Returns a team object if it was successfully created, 'false' otherwise.

Example

addCommandHandler ( "gimmeATeam", "gimmeATeam" )
function gimmeATeam ( source, key, teamName )
  team = createTeam ( teamName ) -- create a new team with the specified name
  if ( team ) then -- if it was successfully created
    addPlayerToTeam ( source, team ) -- add the player to the new team
  end
end

See Also