Resource:Battlefield/getSquadTeam: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with 'This function retrieves a squad element's team. ==Syntax== <syntaxhighlight lang="lua"> team getSquadTeam ( squad squadElement ) </syntaxhighlight>')
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
team getSquadTeam ( squad squadElement )
team getSquadTeam ( squad squadElement )
</syntaxhighlight>
</syntaxhighlight>
=Required Argument=
*'''squadElement''': The squad you want to retrieve the team from.
=Source Code=
<syntaxhighlight lang="lua">function getSquadTeam(squadElement)
if(squadElement)then
team = getElementData(squadElement,"team")
return team
else
return false
end
end</syntaxhighlight>
[[Resource:Battlefield]]

Latest revision as of 04:45, 22 May 2012

This function retrieves a squad element's team.

Syntax

team getSquadTeam ( squad squadElement )

Required Argument

  • squadElement: The squad you want to retrieve the team from.

Source Code

function getSquadTeam(squadElement)
	if(squadElement)then
		team = getElementData(squadElement,"team")
		return team
	else
		return false
	end
end


Resource:Battlefield