Entity/GetNWString

From Garry's Mod
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

any fallback=""

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

Returns

any

The value associated with the key

Examples

Example

Prints the player's rank

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

Output:

"superadmin" in single-player
Personal tools
Navigation