Garry's Mod Wiki


Entity:SetNWEntity( string key, Entity value )


Sets a networked entity value on the entity.

The value can then be accessed with Entity:GetNWEntity both from client and server.

Running this function clientside will only set it for the client it is called on.


1 string key
The key to associate the value with
2 Entity value
The value to set


This will set the networked entity 'owner' on all clients to themselves.

for k, v in pairs( player.GetAll() ) do v:SetNWEntity( "owner", v ) end

Page Links

Special Pages



Render Time: 33ms

DB GetPage 3
Generate Html 4
SaveChanges (1) 12
Render Body 0
Render Sidebar 12