Entity.GetNetworkedString

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetNetworkedString( Var index [, String default] )
Description:
Returns a networked String in this entity set with Entity.SetNetworkedString with the given index.
Returns: String
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetNetworkedString]Entity.GetNetworkedString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets a networked string from an entity.
Used onNewerShared.png
Code
Entity:GetNetworkedString(my_variable)
OutputN/A
DescriptionGets a networked string "Name" from entity "FirstEnt" and sets the networked string "Name" of "SecondEnt" to it.
Used onNewerServer.png
Code
 
SecondEnt = ents.Create("prop_physics")
Name = FirstEnt:GetNetworkedString("Name")
SecondEnt:SetNetworkedString("Name", Name)
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox