Garry's Mod Wiki

Entity:SetNWVector

Entity:SetNWVector( string key, Vector value )

Description

Sets a networked vector value on the entity.

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

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

Arguments

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

Example

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

Page Links


Special Pages


Wikis

?

Render Time: 83ms

DB GetPage 50
Generate Html 10
SaveChanges (1) 10
Render Body 0
Render Sidebar 10