GetRandomPlayer: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 12: | Line 12: | ||
<syntaxhighlight lang="lua">player = GetRandomPlayer ( ) | <syntaxhighlight lang="lua">player = GetRandomPlayer ( ) | ||
outputChatBox ( GetPlayerName ( player ) , " is now the fugitive!" )</syntaxhighlight> | outputChatBox ( GetPlayerName ( player ) , " is now the fugitive!" )</syntaxhighlight> | ||
==See Also== | |||
{{Player functions}} |
Revision as of 20:03, 20 May 2006
Description
This function returns a random player object. It is useful for assigning objectives to random players in a Manhunt mode, for example.
Syntax
player GetRandomPlayer ()
Required Arguments
This function has no arguments.
Example
player = GetRandomPlayer ( ) outputChatBox ( GetPlayerName ( player ) , " 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