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: 36ms

Session 0
DB GetPage 3
Generate Html 12
SaveChanges 11
Render Body 0
Render Sidebar 7