Commit ee8b9f98 authored by Neoony's avatar Neoony
Browse files

v0.8 WIP Added nc_vt_pd to enable or disable VoteTime plugin compatibility

parent 30500ca7
......@@ -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_alltalke;
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_alltalke, nc_vt_pd;
int origvotetime;
int addvotetime;
......@@ -101,6 +101,7 @@ new String:cvars[][] = {"sv_alltalk", "emp_allowspectators", "emp_sv_vote_comman
int NCEnableDisable = 1;
int ncalltalkm;
int ncalltalkdone = 0;
int ncvtpd;
//VoteTime compatibility
int vton = 0;
......@@ -131,6 +132,7 @@ public void OnPluginStart()
nc_howmanytimese = CreateConVar("nc_howmanytimese", "1", "Enable(1)/Disable(0) limited number of possible extending of the vote.");
nc_howmanytimes = CreateConVar("nc_howmanytimes", "6", "How many times to allow extending of the vote. After that it will start the round and if nobody enters the cv in set time it will do nextmap.");
nc_alltalkm = CreateConVar("nc_alltalkm", "1", "Enable(1)/Disable(0) managing alltalk by NCEV.");
nc_vt_pd = CreateConVar("nc_vt_pd", "1", "Enable(1)/Disable(0) If this is enabled and you use VoteTime pause, NCEV will stop extending.");
//Find all console variables
nc_setvotetime = FindConVar("emp_sv_vote_commander_time");
......@@ -143,7 +145,7 @@ public void OnPluginStart()
HookEvent("commander_elected_player", Event_ElectedPlayer);
HookEvent("vehicle_enter", Event_VehicleEnter);
//
//Hide cvars messages
for(new i = 0; i <sizeof(cvars); i++)
{
new Handle:CVarHandle = FindConVar(cvars[i]);
......@@ -192,6 +194,7 @@ public void OnConfigsExecuted()
nchowmanytimese = nc_howmanytimese.IntValue;
nchowmanytimes = nc_howmanytimes.IntValue;
ncalltalkm = nc_alltalkm.IntValue;
ncvtpd = nc_vt_pd.IntValue;
ncalltalkdone = 0;
minplayersnr = 0;
nclockspecmpnr = 0;
......@@ -539,6 +542,9 @@ public Event_CommVoteTime(Handle:event, const char[] name, bool dontBroadcast)
addvotetime = GetConVarInt(nc_addvotetime);
minplayers = GetConVarInt(nc_minplayers);
marktime = GetConVarInt(nc_marktime);
ncvtpd = GetConVarInt(nc_vt_pd);
nclockspec = GetConVarInt(nc_lockspec);
nclockspecmp = GetConVarInt(nc_lockspecmp);
ClientNumber = GetTeamClientCount(2) + GetTeamClientCount(3);
if (ClientNumber < minplayers)
{
......@@ -560,7 +566,7 @@ public Event_CommVoteTime(Handle:event, const char[] name, bool dontBroadcast)
vtpaused = GetConVarInt(vt_paused);
vtpaused = vt_paused.IntValue;
vton = 1;
if (vton == 1)
if (vton == 1 && ncvtpd == 1)
{
if (vtpaused == 1)
{
......@@ -610,7 +616,7 @@ public Event_CommVoteTime(Handle:event, const char[] name, bool dontBroadcast)
{
if (vton == 1)
{
if (vtpausedused == 1 && nchowmanytimescr == 0)
if (vtpausedused == 1 && ncvtpd == 1 && nchowmanytimescr == 0)
{
if (announcedone5 == 0)
{
......
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