Garry's Mod Wiki


  Entity:SetNWVector( string key, Vector value )


Sets a networked vector value on the entity.

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

There's a 4095 slots Network limit. If you need more, consider using the net library or Entity:SetNW2Vector. You should also consider the fact that you have way too many variables. You can learn more about this limit here: Networking_Usage
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 Vector value
The value to set


This will set the networked vector 'positionzero' on all clients to Vector( 0, 0, 0 ).

for i, ply in ipairs( player.GetAll() ) do ply:SetNWVector( 'positionzero', Vector( 0, 0, 0 ) ) end