Created a CVAR for enabling/disabling the zombie_version CVAR.
This commit is contained in:
parent
b99d253477
commit
54242bb529
@ -142,8 +142,12 @@ public OnPluginStart()
|
|||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
CreateConVar("gs_zombiereloaded_version", VERSION, "[ZR] Current version of this plugin", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
|
CreateConVar("gs_zombiereloaded_version", VERSION, "[ZR] Current version of this plugin", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
|
||||||
CreateConVar("zombie_version", VERSION, "Zombie:Reloaded Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
|
|
||||||
CreateConVar("zombie_enabled", "1", "Not synced with zr_enable", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
|
// Create zombie_version variable if specified.
|
||||||
|
if (GetConVarBool(g_hCvarsList[CVAR_ENABLE_ZM_VERSION_VAR]))
|
||||||
|
{
|
||||||
|
CreateConVar("zombie_version", VERSION, "Zombie:Reloaded Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
|
||||||
|
}
|
||||||
|
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
enum CvarsList
|
enum CvarsList
|
||||||
{
|
{
|
||||||
Handle:CVAR_ENABLE,
|
Handle:CVAR_ENABLE,
|
||||||
|
Handle:CVAR_ENABLE_ZM_VERSION_VAR,
|
||||||
Handle:CVAR_LOG,
|
Handle:CVAR_LOG,
|
||||||
Handle:CVAR_LOGFLAGS,
|
Handle:CVAR_LOGFLAGS,
|
||||||
Handle:CVAR_ROUNDEND_OVERLAY,
|
Handle:CVAR_ROUNDEND_OVERLAY,
|
||||||
@ -117,6 +118,7 @@ CvarsInit()
|
|||||||
// ===========================
|
// ===========================
|
||||||
|
|
||||||
g_hCvarsList[CVAR_ENABLE] = CreateConVar("zr_enable", "1", "");
|
g_hCvarsList[CVAR_ENABLE] = CreateConVar("zr_enable", "1", "");
|
||||||
|
g_hCvarsList[CVAR_ENABLE_ZM_VERSION_VAR] = CreateConVar("zr_enable_zm_version_var", "1", "Enable zombie_version variable for compatibility with ZombieMod server filters.");
|
||||||
|
|
||||||
// ===========================
|
// ===========================
|
||||||
// Log (core)
|
// Log (core)
|
||||||
|
Loading…
Reference in New Issue
Block a user