GetRandomPlayer
Jump to navigation
Jump to search
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 ( getPlayerName ( 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