Bf read.ReadString

From GMod Wiki

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



Examples

DescriptionPrints the incoming string from an usermessage called SendString
Used onNewerClient.png
Code
 
local function ReadString(msg)
   local str = msg:ReadString() -- reads the string
   print(str)
end
usermessage.Hook("SendString", ReadString)
 
OutputA string is printed in console


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox