Player/GetInfo

From Garry's Mod
Jump to: navigation, search
 Player:GetInfo( )

Contents

Description

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

WARNING

The returned value is truncated to 31 bytes.

Arguments

string cVarName

The name of the client-side ConVar

Returns

string

The value of the ConVar

Examples

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
Personal tools
Navigation