Bf read.ReadBool

From GMod Wiki

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



Examples

DescriptionPrints the incoming bool from an usermessage called SendBool
Used onNewerClient.png
Code
local function ReadBool(msg)
   local bool = msg:ReadBool() -- reads the bool
   print(bool)
end
usermessage.Hook("SendBool", ReadBool)
OutputA boolean(true or false) is printed in console


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox