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 i, ply in ipairs( player.GetAll() ) do ply:SetNWEntity( "owner", ply ) end

Page Links

Special Pages



Render Time: 28ms

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