Bf read.ReadFloat

From GMod Wiki

Jump to: navigation, search
Function
Syntax bf_read:ReadFloat( )
Description:
Read a floating point number from the usermessage
Returns: Number
In Object: Bf_read
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Bf read.ReadFloat]Bf read.ReadFloat [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints the incoming float from an usermessage called SendFloat
Used onNewerClient.png
Code
local function ReadFloat(msg)
   local float = msg:ReadFloat() -- reads the float
   print(float)
end
usermessage.Hook("SendFloat", ReadFloat)
OutputA float(a number with a decimal point) is printed in console


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox