GetRandomPlayer: Difference between revisions
Jump to navigation
Jump to search
m (Minor changes) |
mNo edit summary |
||
Line 12: | Line 12: | ||
==Example== | ==Example== | ||
This code outputs a random's | This code outputs a random player's name. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local randomPlayer = getRandomPlayer ( ) | local randomPlayer = getRandomPlayer ( ) |
Revision as of 13:30, 19 August 2007
This function returns a random player.
Syntax
player getRandomPlayer ( )
Returns
Returns a random player, false if the server is empty.
Example
This code outputs a random player's name.
local randomPlayer = getRandomPlayer ( ) outputChatBox ( getClientName ( randomPlayer ).." is now the fugitive!" )
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