Garry's Mod Wiki

Player:GetInfo

string Player:GetInfo( string cVarName )

Description

Retrieves the value of a client-side ConVar. The ConVar must have a FCVAR_USERINFO flag for this to work.

The returned value is truncated to 31 bytes.

Arguments

1 string cVarName
The name of the client-side ConVar.

Returns

1 string
The value of the ConVar.

Example

Creates clientside ConVar Apple and retrieves value of it.

if CLIENT then CreateConVar( "Apple", "ILikeApples", FCVAR_USERINFO ) else MsgN( Entity( 1 ):GetInfo( "Apple" ) ) end
Output: ILikeApples

Page Links


Special Pages


Wikis

?

Render Time: 51ms

DB GetPage 4
Generate Html 16
SaveChanges (1) 9
Render Body 0
Render Sidebar 19