getRandomPlayer | Multi Theft Auto: Wiki Skip to content

getRandomPlayer

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns a random player.

Syntax

getRandomPlayer ( )

Code Examples

server

This code outputs a random player's name.

local randomPlayer = getRandomPlayer ( )
outputChatBox ( getPlayerName ( randomPlayer ).." is now the fugitive!" )

See Also