CountPlayersInTeam: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 60: Line 60:
local ballasCount = countPlayersInTeam ( ballasTeam )
local ballasCount = countPlayersInTeam ( ballasTeam )
if groveCount == ballasCount then --if the teams are equal
if groveCount == ballasCount then --if the teams are equal
addPlayerToTeam ( thePlayer , groveTeam ) --place the player in grove
setPlayerTeam ( thePlayer , groveTeam ) --place the player in grove
elseif groveCount > ballasCount then --if there are more in grove
elseif groveCount > ballasCount then --if there are more in grove
addPlayerToTeam ( thePlayer , ballasTeam ) --place him in ballas
setPlayerTeam ( thePlayer , ballasTeam ) --place him in ballas
elseif groveCount < ballasCount then --if there are more in ballas
elseif groveCount < ballasCount then --if there are more in ballas
addPlayerToTeam ( thePlayer , groveTeam ) --place him in grove.
setPlayerTeam ( thePlayer , groveTeam ) --place him in grove.
end
end
end</syntaxhighlight>
end</syntaxhighlight>

Revision as of 22:46, 7 January 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