CountPlayersInTeam: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 22: Line 22:
local theTeam = getPlayerTeam ( source )
local theTeam = getPlayerTeam ( source )
-- If the player is in any team
-- If the player is in any team
if team then
if theTeam then
-- Tell the player how big his team is
-- Tell the player how big his team is
outputChatBox ( "Your team has " .. countPlayersInTeam ( theTeam ) .. " players.", source )
outputChatBox ( "Your team has " .. countPlayersInTeam ( theTeam ) .. " players.", source )
Line 68: Line 68:
end</syntaxhighlight>
end</syntaxhighlight>
</section>
</section>
==See Also==
==See Also==
{{Team functions}}
{{Team functions}}

Revision as of 17:38, 25 October 2008

This function is for returning the number of players in the specified team.

Syntax

int countPlayersInTeam ( team theTeam )

Optional Arguments

  • theTeam: The team you wish to retrieve the player count of.

Returns

Returns an integer containing the number of players in the team, false if it could not be retrieved.

Example

Click to expand [+]
Example 1
Click to expand [+]
Example 2
Click to expand [+]
Example 3

See Also

Shared