GetPlayerCount: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 20: | Line 20: | ||
==See Also== | ==See Also== | ||
{{ | {{Player functions}} |
Revision as of 20:05, 20 May 2006
This function returns the number of players currently connected to the server.
Syntax
int getPlayerCount ()
Returns
Returns the number of players connected to the server as an int.
Example
This example displays a chat message with the number of players connected to the server.
-- Retrieve the number of players connected to the server and store the number in the playercount variable playercount = getPlayerCount () -- Display a chat message informing everyone on the server how many people are playing. outputChatBox ( "There are currently ", playercount, " players playing in the server" )
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState