Bf read.ReadVector

From GMod Wiki

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



Examples

DescriptionPrints the incoming vector from an usermessage called SendVector
Used onNewerClient.png
Code
 
local function ReadVector(msg)
   local vec = msg:ReadVector() -- reads the vector
   print(vec)
end
usermessage.Hook("SendVector", ReadVector)
 
OutputA vector(ie. Vector(30,-23,58)) is printed in console.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox