RandFloat

From Multi Theft Auto: Wiki
Jump to:navigation, search

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use math.random instead.


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

  • addDebugHook
  • base64Decode
  • base64Encode
  • bitAnd
  • bitNot
  • bitOr
  • bitXor
  • bitTest
  • bitLRotate
  • bitRRotate
  • bitLShift
  • bitRShift
  • bitArShift
  • bitExtract
  • bitReplace
  • debugSleep
  • decodeString
  • encodeString
  • fromJSON
  • getColorFromString
  • getDevelopmentMode
  • getDistanceBetweenPoints2D
  • getDistanceBetweenPoints3D
  • getEasingValue
  • getFPSLimit
  • getNetworkStats
  • getNetworkUsageData
  • getPerformanceStats
  • getRealTime
  • getServerConfigSetting
  • getTickCount
  • getTimerDetails
  • getTimers
  • gettok
  • getUserdataType
  • getVersion
  • hash
  • inspect
  • interpolateBetween
  • iprint
  • isOOPEnabled
  • isTimer
  • killTimer
  • md5
  • passwordHash
  • passwordVerify
  • pregFind
  • pregMatch
  • pregReplace
  • removeDebugHook
  • resetTimer
  • setDevelopmentMode
  • setFPSLimit
  • setServerConfigSetting
  • setTimer
  • sha256
  • split
  • teaDecode
  • teaEncode
  • tocolor
  • toJSON
  • utfChar
  • utfCode
  • utfLen
  • utfSeek
  • utfSub


Retrieved from "https://wiki.multitheftauto.com/index.php?title=RandFloat&oldid=40343"
Categories:
  • Server functions
  • Deprecated

Navigation menu

Views

  • Page
  • Discussion
  • View source
  • History

Personal tools

  • Create account
  • Log in

Navigation

  • Home
  • How you can help
  • Recent changes
  • Random page

reference

  • Client Functions
  • Client Events
  • Server Functions
  • Server Events
  • Shared Functions
  • Useful Functions
  • MTA Classes
  • MTA Elements
  • Element Tree

 

Tools

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link
  • Page information
GNU Free Documentation License 1.2
Powered by MediaWiki
  • This page was last edited on 26 June 2014, at 12:18.
  • Content is available under GNU Free Documentation License 1.2 unless otherwise noted.
  • Privacy policy
  • About Multi Theft Auto: Wiki
  • Disclaimers