Garry's Mod Wiki

Entity:GetNWString

any Entity:GetNWString( string key, any fallback )

Description

Retrieves a networked string value at specified index on the entity that is set by Entity:SetNWString.

Arguments

1 string key
The key that is associated with the value
2 any fallback
The value to return if we failed to retrieve the value. (If it isn't set)

Returns

1 any
The value associated with the key

Example

Prints the player's rank

print( Entity(1):GetNWString( "usergroup" ) )
Output: "superadmin" in single-player

Page Links


Special Pages


Wikis

?

Render Time: 39ms

Session 0
DB GetPage 6
Generate Html 10
SaveChanges 9
Render Body 0
Render Sidebar 12