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 angle 'direction' on all clients to straight up.

for k, v in pairs( player.GetAll() ) do v:SetNWVector( 'direction', Vector( 0, 0, 1 ) ) end

Page Links


Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 4
Generate Html 10
SaveChanges (1) 20
Render Body 0
Render Sidebar 11