Thread
:
cvar help.
View Single Post
hamza47sohail
Senior Member
Join Date: Jan 2014
04-12-2014 , 14:37 Re: cvar help.
#
3
Quote:
Originally Posted by
Powerlord
So, something like
PHP Code:
if (
GetConVarBool
(
g_Cvar_Handle
))
{
}
Of course, to get the cvar handle you have to either call
CreateConVar
(to create a new one, should be done in OnPluginStart) or
FindConVar
(to get a handle to an existing one, will return INVALID_HANDLE if not found, should be called in OnAllPluginsLoaded).
FindConVar is a somewhat expensive operation, so you should cache the results.
Thanks
hamza47sohail
View Public Profile
Send a private message to hamza47sohail
Find More Posts by hamza47sohail