Garry's Mod Wiki

Entity:SetNWAngle

  Entity:SetNWAngle( string key, Angle value )

Description

Sets a networked angle value on the entity.

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

There's a 4095 slots Network limit. If you need more, consider using the net library or Entity:SetNW2Angle. 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.

Arguments

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

Example

This will set the networked angle 'direction' on all clients that is pointing straight up.

for i, ply in ipairs( player.GetAll() ) do ply:SetNWAngle( 'direction', Angle( -90, 0, 0 ) ) end