Garry's Mod Wiki

Entity:SetNWBool

Entity:SetNWBool( string key, boolean value )

Description

Sets a networked boolean value on the entity.

The value can then be accessed with Entity:GetNWBool 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 boolean value
The value to set

Example

Sets a networked boolean with a key of "VIP" and a value of true on a player.

player:SetNWBool( "VIP", true ) print( player:GetNWBool( "VIP" ) )
Output: true

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 2
Generate Html 6
SaveChanges 8
Render Body 0
Render Sidebar 11