hopefully fixed that its always detected when bots are missing
This commit is contained in:
parent
7b7f7a424b
commit
caf674479c
@ -158,6 +158,7 @@ public Action CheckPlayerTeam(Handle timer, any userid)
|
|||||||
if (client == 0)
|
if (client == 0)
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
|
|
||||||
|
checkIfRestartNeeded();
|
||||||
if (!IsValidClient(client) || IsPlayerAlive(client) || (GetClientTeam(client) != CS_TEAM_T && GetClientTeam(client) != CS_TEAM_CT)
|
if (!IsValidClient(client) || IsPlayerAlive(client) || (GetClientTeam(client) != CS_TEAM_T && GetClientTeam(client) != CS_TEAM_CT)
|
||||||
|| IsFakeClient(client))
|
|| IsFakeClient(client))
|
||||||
{
|
{
|
||||||
@ -210,7 +211,7 @@ public Action Timer_CheckIfRestartNeeded(Handle timer, any userid)
|
|||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action ApplySettings(Event event, const char[] name, bool dontBroadcast)
|
public void checkIfRestartNeeded()
|
||||||
{
|
{
|
||||||
int activeBots = 0;
|
int activeBots = 0;
|
||||||
int activePlayers = 0;
|
int activePlayers = 0;
|
||||||
@ -237,7 +238,11 @@ public Action ApplySettings(Event event, const char[] name, bool dontBroadcast)
|
|||||||
{
|
{
|
||||||
CreateTimer(10.0, Timer_CheckIfRestartNeeded); //if only one guy is on a team we force a restart to spawn the bots.
|
CreateTimer(10.0, Timer_CheckIfRestartNeeded); //if only one guy is on a team we force a restart to spawn the bots.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Action ApplySettings(Event event, const char[] name, bool dontBroadcast)
|
||||||
|
{
|
||||||
|
checkIfRestartNeeded();
|
||||||
|
|
||||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||||
if (!IsValidClient(client) || !IsPlayerAlive(client) || IsClientSourceTV(client))
|
if (!IsValidClient(client) || !IsPlayerAlive(client) || IsClientSourceTV(client))
|
||||||
|
Loading…
Reference in New Issue
Block a user