RandFloat

From Multi Theft Auto: Wiki
Revision as of 21:30, 20 April 2011 by Arran Fortuna (talk | contribs)
Jump to navigation Jump to search


Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.


Please use math.random(1)

This function generates a random number between 0 and 1.

Syntax

float randFloat ()

Returns

Returns a random number between 0 and 1 in a float.

Example

This example outputs a random number in the chat box.

outputChatBox ( "Random float: " .. randFloat () )

See Also