Entity/GetNWString

From Garry's Mod
Revision as of 22:22, 11 September 2016 by Code gs (Talk | contribs)
Jump to: navigation, search
 Entity:GetNWString( )

Contents

Description

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

Arguments

string key

The key that is associated with the value

Arguments

string fallback=""

The value to return if we failed to retrieve the value. ( If it isn't set )

Returns

string

The retrieved value

Examples

Example

Prints the player's rank

print( Entity(1):GetNWString( "usergroup" ) )

Output:

"superadmin" in single-player
Personal tools
Navigation