GetTeamFromName

From Multi Theft Auto: Wiki
Revision as of 15:31, 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 finding a team object from its name.

Syntax

team getTeamFromName ( string teamName )

Required Arguments

  • teamName: A string determining the name of the team you wish to find.

Returns

Returns the team object if it was found, 'false' otherwise.

Example

This example destroys a team named "Red", if it is found.

team = getTeamFromName ( "Red" ) -- try to find the team named 'Red'
if ( team ) then -- if it was found
  destroyTeam ( team )
end

See Also