GetRandomPlayer: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function returns a random [[player]] object. It is useful for assigning objectives to random players in a Manhunt mode, for example. | This function returns a random [[player]] object. It is useful for assigning objectives to random players in a Manhunt mode, for example. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">player | <syntaxhighlight lang="lua">player getRandomPlayer ()</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 10: | Line 9: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">player = | <syntaxhighlight lang="lua">player = getRandomPlayer ( ) | ||
outputChatBox ( | outputChatBox ( getPlayerName ( player ).."is now the fugitive!" )</syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Revision as of 21:41, 13 August 2006
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