Revision Difference
Entity:SetNWAngle#527951
<function name="SetNWAngle" parent="Entity" type="classfunc">
<description>
Sets a networked angle value on the entity.
The value can then be accessed with <page>Entity:GetNWAngle</page> both from client and server.
<note>Running this function clientside will only set it for the client it is called on.</note>
</description>
<realm>Shared</realm>
<args>
<arg name="key" type="string">The key to associate the value with</arg>
<arg name="value" type="Angle">The value to set</arg>
</args>
</function>
<example>
<description>This will set the networked angle 'direction' on all clients that is pointing straight up.</description>
<code>
for k, v in pairs( player.GetAll() ) do
v:SetNWAngle( 'direction', Angle( -90, 0, 0 ) )
for i, ply in ipairs( player.GetAll() ) do
ply:SetNWAngle( 'direction', Angle( -90, 0, 0 ) )
end
</code>
</example>