GetRandomPlayer

From Multi Theft Auto: Wiki
Revision as of 23:17, 28 December 2014 by Strix (talk | contribs)
Jump to navigation Jump to search

This function returns a random player.

Syntax

player getRandomPlayer ( )

OOP Syntax Help! I don't understand this!

Method: Player.getRandom(...)
Variable: .random


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