Bf read.ReadEntity

From GMod Wiki

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



Examples

DescriptionPrints the incoming entity from an usermessage called SendEntity
Used onNewerClient.png
Code
local function ReadEntity(msg)
   local ent = msg:ReadEntity() -- reads the entity
   print(ent)
end
usermessage.Hook("SendEntity", ReadEntity)
OutputAn entity(ie. Player [1] ["whitespace"]) is printed to console.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox