Commit 0530a5fe authored by Neoony's avatar Neoony
Browse files

v0.8 WIP Added nc_pugc to enable or disable compatibility with PUG plugin

parent ceabf6e0
......@@ -33,7 +33,7 @@ public Plugin myinfo =
}
//ConVars
ConVar nc_setvotetime, nc_allowspec, nc_addvotetime, nc_minplayers, nc_msgtimer, nc_marktime, nc_commcheck, nc_commcheckmp, nc_commchecktime, nc_lockspec, nc_lockspecmp, nc_lockspechide, nc_lockspectime, nc_howmanytimese, nc_howmanytimes, nc_alltalkm, nc_alltalkmmp, nc_alltalke, nc_vt;
ConVar nc_setvotetime, nc_allowspec, nc_addvotetime, nc_minplayers, nc_msgtimer, nc_marktime, nc_commcheck, nc_commcheckmp, nc_commchecktime, nc_lockspec, nc_lockspecmp, nc_lockspechide, nc_lockspectime, nc_howmanytimese, nc_howmanytimes, nc_alltalkm, nc_alltalkmmp, nc_alltalke, nc_vt, nc_pugc;
int origvotetime;
int addvotetime;
......@@ -110,6 +110,7 @@ int ncalltalkmmpnr = 0;
int ncalltalkmmpstarted = 0;
int ncalltalk;
int pugonvalue = 0;
int ncpugc
//VoteTime compatibility
int vton = 0;
......@@ -142,6 +143,7 @@ public void OnPluginStart()
nc_alltalkm = CreateConVar("nc_alltalkm", "1", "Enable(1)/Disable(0) managing alltalk by NCEV.");
nc_alltalkmmp = CreateConVar("nc_alltalkmmp", "8", "How many players needed to enable managing alltalk by NCEV. (Clients on the server + connecting clients.)");
nc_vt = CreateConVar("nc_vt", "1", "Enable(1)/Disable(0) If this is enabled and you use VoteTime pause, NCEV will stop extending.");
nc_pugc = CreateConVar("nc_pugc", "1", "Enable(1)/Disable(0) compatibility with ScardyBobs PUG plugin.");
//Find all console variables
nc_setvotetime = FindConVar("emp_sv_vote_commander_time");
......@@ -204,6 +206,7 @@ public void OnConfigsExecuted()
nchowmanytimes = nc_howmanytimes.IntValue;
ncalltalkm = nc_alltalkm.IntValue;
ncalltalkmmp = nc_alltalkmmp.IntValue;
ncpugc = nc_pugc.IntValue;
ncvt = nc_vt.IntValue;
ncalltalkmmpnr = 0;
ncalltalkmmpstarted = 0;
......@@ -332,16 +335,19 @@ public void OnConfigsExecuted()
vtpaused = vt_paused.IntValue;
vton = 1;
}
if (FindConVar("pug_active") != INVALID_HANDLE)
if (ncpugc == 1)
{
ConVar pug_active;
pug_active = FindConVar("pug_active");
pugonvalue = GetConVarInt(pug_active);
}
if (pugonvalue == 1)
{
ServerCommand("sm plugins unload NoCommExtendVote");
PrintToServer("[NCEV] Unloaded. PUG plugin on.");
if (FindConVar("pug_active") != INVALID_HANDLE)
{
ConVar pug_active;
pug_active = FindConVar("pug_active");
pugonvalue = GetConVarInt(pug_active);
if (pugonvalue == 1)
{
PrintToServer("[NCEV] Unloaded. PUG plugin on");
ServerCommand("sm plugins unload NoCommExtendVote");
}
}
}
if (pugonvalue != 1)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment