Entity/SetNWAngle

From Garry's Mod
Jump to: navigation, search
 Entity:SetNWAngle( )

Contents

Description

Sets a networked angle value on the entity.

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

NOTE

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

Arguments

string key

The key to associate the value with

Arguments

Angle value

The value to set

Examples

Example

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

for k, v in pairs( player.GetAll() ) do
    v:SetNWAngle( 'direction', Angle( -90, 0, 0 ) )
end


Personal tools
Navigation