Entity.SetNetworkedString

From GMod Wiki

Revision as of 11:22, 20 December 2010 by Cube334 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:SetNetworkedString( Var index, String value )
Description:
Sets a networked String in this entity with the given index to the given value.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetNetworkedString]Entity.SetNetworkedString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSets networked strings "Name" and "Country" for entity "Box" and prints them to console
Used onNewerServer.png
Code
 
Box = ents.Create("prop_physics")
Box:SetNetworkedString("Name", "Bill Gates")
Box:SetNetworkedString("Country","United States")
Msg(Box:GetNetworkedString("Name")..": "..Box:GetNetworkedString("Country"))
 
OutputBill Gates: United States


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox