majorly redid fakeclients behaviour to be balanced, updated knockback modifier to only consider mapcooldowns of over 60 hours and to check the timeleft on maps to prevent triggering the condition hopefully too early
This commit is contained in:
parent
7d5e56540a
commit
f37711fbdf
@ -1,5 +1,4 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <BotTargeting>
|
|
||||||
#include <cstrike>
|
#include <cstrike>
|
||||||
#include <mapchooser_extended>
|
#include <mapchooser_extended>
|
||||||
|
|
||||||
@ -10,7 +9,7 @@ public Plugin myinfo =
|
|||||||
name = "knockback low pop modifier",
|
name = "knockback low pop modifier",
|
||||||
author = "jenz",
|
author = "jenz",
|
||||||
description = "balances knockback for low population",
|
description = "balances knockback for low population",
|
||||||
version = "1.0.0",
|
version = "1.1.0",
|
||||||
url = ""
|
url = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ public void OnMapStart()
|
|||||||
{
|
{
|
||||||
//Decided for now to exclude MaxPlayers
|
//Decided for now to exclude MaxPlayers
|
||||||
//MaxTime, MinTime, MinPlayers, CooldownTime, MinHoursAvg
|
//MaxTime, MinTime, MinPlayers, CooldownTime, MinHoursAvg
|
||||||
if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 /*|| GetMapMaxPlayers(map) != 0*/ || GetMapCooldownTime2(map) > 60
|
if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 || GetMapCooldownTime2(map) > 60
|
||||||
|| GetMapMinHoursAvg(map) != 0)
|
|| GetMapMinHoursAvg(map) != 0)
|
||||||
{
|
{
|
||||||
g_bDoingMapTouristMode = true;
|
g_bDoingMapTouristMode = true;
|
||||||
@ -52,56 +51,55 @@ public void OnMapStart()
|
|||||||
|
|
||||||
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||||
{
|
{
|
||||||
if (CS_GetTeamScore(CS_TEAM_T) == 0 && CS_GetTeamScore(CS_TEAM_CT) == 0)
|
ServerCommand("zr_class_set_multiplier zombies knockback 1.0");
|
||||||
|
ServerCommand("sm_iammo @all 0");
|
||||||
|
|
||||||
|
int TimeLeft;
|
||||||
|
if (GetMapTimeLeft(TimeLeft) && TimeLeft < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int active_player_count = 0;
|
int active_player_count = 0;
|
||||||
|
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
for (int i = 1; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if(IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i) && !IsFakeClient(i) && !IsClientAutismBot(i) && !IsClientSourceTV(i))
|
if (IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i) && !IsFakeClient(i) && !IsClientSourceTV(i))
|
||||||
{
|
{
|
||||||
active_player_count++;
|
active_player_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int choosen_number = 14;
|
||||||
int choosen_number = 24;
|
|
||||||
if (active_player_count < choosen_number)
|
if (active_player_count < choosen_number)
|
||||||
{
|
{
|
||||||
int zombie_ratio = GetConVarInt(FindConVar("zr_infect_mzombie_ratio"));
|
int zombie_ratio = GetConVarInt(FindConVar("zr_infect_mzombie_ratio"));
|
||||||
|
int infectectable_players = 0;
|
||||||
|
for (int i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i) && GetClientTeam(i) > CS_TEAM_SPECTATOR)
|
||||||
|
{
|
||||||
|
infectectable_players++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float knockback_increase = float(zombie_ratio) / float(active_player_count);
|
float knockback_increase = float(zombie_ratio) / float(infectectable_players);
|
||||||
|
|
||||||
if (knockback_increase > 3.0)
|
if (knockback_increase > 3.0)
|
||||||
knockback_increase = 3.0;
|
knockback_increase = 3.0;
|
||||||
else if(knockback_increase < 1.0)
|
else if(knockback_increase < 1.0)
|
||||||
knockback_increase = 1.0
|
knockback_increase = 1.0
|
||||||
|
|
||||||
if (knockback_increase > 1.0 || (g_bDoingMapTouristMode && active_player_count < choosen_number))
|
ServerCommand("zr_class_set_multiplier zombies knockback 1.0");
|
||||||
{
|
|
||||||
if (g_bDoingMapTouristMode)
|
if (g_bDoingMapTouristMode)
|
||||||
{
|
{
|
||||||
CreateTimer(3.0, SetHealthOnCT);
|
CreateTimer(3.0, SetHealthOnCT);
|
||||||
}
|
}
|
||||||
else
|
else if (knockback_increase > 1.0)
|
||||||
{
|
{
|
||||||
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
||||||
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
||||||
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
PrintToChatAll("LOW POP: increased zombie knockback to X%.2f to balance gameplay", knockback_increase);
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!g_bDoingMapTouristMode)
|
|
||||||
{
|
|
||||||
ServerCommand("zr_class_set_multiplier zombies knockback %.2f", knockback_increase);
|
ServerCommand("zr_class_set_multiplier zombies knockback %.2f", knockback_increase);
|
||||||
}
|
}
|
||||||
ServerCommand("sm_iammo @all 0");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ServerCommand("zr_class_set_multiplier zombies knockback 1.0");
|
|
||||||
ServerCommand("sm_iammo @all 0");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,16 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <zombiereloaded>
|
|
||||||
#include <cstrike>
|
#include <cstrike>
|
||||||
|
|
||||||
#pragma semicolon 1
|
#pragma semicolon 1
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
|
|
||||||
#define MAXNAMES 500
|
|
||||||
ArrayList g_hNames;
|
ArrayList g_hNames;
|
||||||
ArrayList g_hClanNames;
|
ArrayList g_hClanNames;
|
||||||
|
|
||||||
int g_iBaseLatency[MAXPLAYERS + 1];
|
int g_iBaseLatency[MAXPLAYERS + 1];
|
||||||
int g_iLatency[MAXPLAYERS + 1];
|
int g_iLatency[MAXPLAYERS + 1];
|
||||||
|
int g_iFakesCount;
|
||||||
int g_iAdminFakes;
|
|
||||||
|
|
||||||
Database g_hDatabase;
|
Database g_hDatabase;
|
||||||
Database g_hDatabase_hlstats;
|
Database g_hDatabase_hlstats;
|
||||||
@ -37,16 +34,14 @@ public void OnPluginStart()
|
|||||||
{
|
{
|
||||||
RegAdminCmd("sm_debugfakes", Command_DebugFakes, ADMFLAG_GENERIC, "Shows the amount of fake-clients on server");
|
RegAdminCmd("sm_debugfakes", Command_DebugFakes, ADMFLAG_GENERIC, "Shows the amount of fake-clients on server");
|
||||||
RegAdminCmd("sm_fakes", Command_Fakes, ADMFLAG_GENERIC, "Shows the fake-clients on server");
|
RegAdminCmd("sm_fakes", Command_Fakes, ADMFLAG_GENERIC, "Shows the fake-clients on server");
|
||||||
RegAdminCmd("sm_setfakes", Command_SetFakes, ADMFLAG_RCON, "Manually sets the amount of fake-clients");
|
|
||||||
|
|
||||||
int arraySize = ByteCountToCells(MAX_NAME_LENGTH);
|
int arraySize = ByteCountToCells(MAX_NAME_LENGTH);
|
||||||
g_hNames = CreateArray(arraySize);
|
g_hNames = CreateArray(arraySize);
|
||||||
g_hClanNames = CreateArray(arraySize);
|
g_hClanNames = CreateArray(arraySize);
|
||||||
|
|
||||||
g_iAdminFakes = -1;
|
CreateTimer(GetRandomFloat(20.0, 40.0), RunPopulationCheck, _, TIMER_REPEAT);
|
||||||
CreateTimer(2.0, RunPopulationCheck, _, TIMER_REPEAT);
|
|
||||||
CreateTimer(3.0, RandomizePing, _, TIMER_REPEAT);
|
CreateTimer(3.0, RandomizePing, _, TIMER_REPEAT);
|
||||||
CreateTimer(150.0, RandomizeNames, _, TIMER_REPEAT);
|
CreateTimer(600.0, RandomizeNames, _, TIMER_REPEAT);
|
||||||
|
|
||||||
HookUserMessage(GetUserMessageId("SayText2"), UserMessage_SayText2, true);
|
HookUserMessage(GetUserMessageId("SayText2"), UserMessage_SayText2, true);
|
||||||
|
|
||||||
@ -58,6 +53,28 @@ public void OnPluginStart()
|
|||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect_hlstats, "hlstatsx");
|
Database.Connect(SQL_OnDatabaseConnect_hlstats, "hlstatsx");
|
||||||
}
|
}
|
||||||
|
HookEvent("round_start", Event_roundStart, EventHookMode_Pre);
|
||||||
|
g_iFakesCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Event_roundStart(Handle event, const char[] name, bool dontBroadcast)
|
||||||
|
{
|
||||||
|
int TimeLeft;
|
||||||
|
if (GetMapTimeLeft(TimeLeft) && TimeLeft < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_iFakesCount = 0;
|
||||||
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i))
|
||||||
|
{
|
||||||
|
if (IsFakeClient(i) && !IsClientSourceTV(i))
|
||||||
|
{
|
||||||
|
g_iFakesCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SQL_OnDatabaseConnect_hlstats(Database db, const char[] error, any data)
|
public void SQL_OnDatabaseConnect_hlstats(Database db, const char[] error, any data)
|
||||||
@ -74,7 +91,7 @@ public void SQL_OnDatabaseConnect_hlstats(Database db, const char[] error, any d
|
|||||||
public void randomize_clantags()
|
public void randomize_clantags()
|
||||||
{
|
{
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
Format(sQuery, sizeof(sQuery), "select DISTINCT tag from unloze_stats.hlstats_Clans ORDER BY RAND() limit 500");
|
Format(sQuery, sizeof(sQuery), "select DISTINCT tag from unloze_stats.hlstats_Clans ORDER BY RAND() limit 1000");
|
||||||
g_hDatabase_hlstats.Query(SQL_OnQueryCompleted_hlstats, sQuery, DBPrio_High);
|
g_hDatabase_hlstats.Query(SQL_OnQueryCompleted_hlstats, sQuery, DBPrio_High);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +109,7 @@ public void SQL_OnDatabaseConnect(Database db, const char[] error, any data)
|
|||||||
public void randomize_names()
|
public void randomize_names()
|
||||||
{
|
{
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
Format(sQuery, sizeof(sQuery), "select name from unloze_racetimer_css.random_names ORDER BY RAND() limit 500");
|
Format(sQuery, sizeof(sQuery), "select name from unloze_racetimer_css.random_names ORDER BY RAND() limit 1000");
|
||||||
g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, DBPrio_High);
|
g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, DBPrio_High);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,34 +177,23 @@ public void OnPluginEnd()
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public void OnMapStart()
|
public void OnMapStart()
|
||||||
{
|
{
|
||||||
g_hNames.Clear();
|
for (float i = 0.0; i < g_iFakesCount;)
|
||||||
g_hClanNames.Clear();
|
|
||||||
if (!g_hDatabase)
|
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "racetimercss");
|
i += 1.0;
|
||||||
}
|
CreateTimer(i, addfakes);
|
||||||
else
|
|
||||||
{
|
|
||||||
randomize_names();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!g_hDatabase_hlstats)
|
|
||||||
{
|
|
||||||
Database.Connect(SQL_OnDatabaseConnect_hlstats, "hlstatsx");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
randomize_clantags();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
public Action addfakes(Handle timer)
|
||||||
// Purpose:
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
public void OnMapEnd()
|
|
||||||
{
|
{
|
||||||
g_iAdminFakes = -1;
|
CreateFake();
|
||||||
|
if (GetRandomInt(0, 10) <= 3)
|
||||||
|
{
|
||||||
|
SetFakeToTeam();
|
||||||
}
|
}
|
||||||
|
return Plugin_Continue;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -315,30 +321,6 @@ public Action Command_DebugFakes(int client, int argc)
|
|||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
// Purpose:
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
public Action Command_SetFakes(int client, int argc)
|
|
||||||
{
|
|
||||||
if (argc < 1)
|
|
||||||
{
|
|
||||||
ReplyToCommand(client, "[SM] Usage: sm_setfakes <amount of fakes>");
|
|
||||||
return Plugin_Handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
char sArgs[16];
|
|
||||||
GetCmdArg(1, sArgs, sizeof(sArgs));
|
|
||||||
|
|
||||||
if (!StringToIntEx(sArgs, g_iAdminFakes))
|
|
||||||
{
|
|
||||||
ReplyToCommand(client, "[SM] Invalid value");
|
|
||||||
return Plugin_Handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReplyToCommand(client, "[SM] You set the amount of Fake-Clients to %d.", g_iAdminFakes);
|
|
||||||
return Plugin_Handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -427,36 +409,15 @@ public void CheckPopulation()
|
|||||||
int iPlayers = iPlayersInTeam + iPlayersSpectate + iFakesInTeam + iFakesSpectate;
|
int iPlayers = iPlayersInTeam + iPlayersSpectate + iFakesInTeam + iFakesSpectate;
|
||||||
if (iPlayers >= 55)
|
if (iPlayers >= 55)
|
||||||
{
|
{
|
||||||
if (iFakesInTeam > 0)
|
KickFakes();
|
||||||
{
|
|
||||||
KickFakeFromTeam();
|
|
||||||
}
|
|
||||||
else if (iFakesSpectate > 1)
|
|
||||||
{
|
|
||||||
KickFakeFromSpec();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (iPlayers > 50 && iFakesInTeam + iFakesSpectate >= 10)
|
else if (iPlayers > 50 && iFakesInTeam + iFakesSpectate >= 10)
|
||||||
{
|
{
|
||||||
if (iFakesInTeam >= iFakesSpectate >= 0)
|
KickFakes();
|
||||||
{
|
|
||||||
KickFakeFromTeam();
|
|
||||||
}
|
|
||||||
else if (iFakesSpectate >= iFakesInTeam >= 1)
|
|
||||||
{
|
|
||||||
KickFakeFromSpec();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (iPlayers >= 46 && iFakesInTeam + iFakesSpectate > 16)
|
else if (iPlayers >= 46 && iFakesInTeam + iFakesSpectate > 16)
|
||||||
{
|
{
|
||||||
if (iFakesInTeam >= iFakesSpectate >= 0)
|
KickFakes();
|
||||||
{
|
|
||||||
KickFakeFromTeam();
|
|
||||||
}
|
|
||||||
else if (iFakesSpectate >= iFakesInTeam >= 1)
|
|
||||||
{
|
|
||||||
KickFakeFromSpec();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (48 > iPlayers > 44 && iFakesSpectate + iFakesInTeam < 13)
|
else if (48 > iPlayers > 44 && iFakesSpectate + iFakesInTeam < 13)
|
||||||
{
|
{
|
||||||
@ -468,60 +429,61 @@ public void CheckPopulation()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ManageFakes(int iPlayersSpectate, int iPlayersInTeam, int iFakesInTeam, int iFakesSpectate)
|
public void KickFakes()
|
||||||
{
|
{
|
||||||
if (iPlayersSpectate + iPlayersInTeam + 6 > iFakesSpectate + iFakesInTeam)
|
int fake_in_spec = 0;
|
||||||
{
|
int fake_in_team = 0;
|
||||||
CreateFake();
|
|
||||||
int max = 5;
|
|
||||||
if (iPlayersSpectate + iFakesSpectate > 16)
|
|
||||||
{
|
|
||||||
max = 8;
|
|
||||||
}
|
|
||||||
else if (iPlayersSpectate + iFakesSpectate < 9)
|
|
||||||
{
|
|
||||||
max = 3;
|
|
||||||
}
|
|
||||||
if (GetRandomInt(0, 10) > max)
|
|
||||||
{
|
|
||||||
SetFakeToSpectate();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetFakeToTeam();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int max = 5;
|
|
||||||
if (iPlayersSpectate + iFakesSpectate > 16)
|
|
||||||
{
|
|
||||||
max = 8;
|
|
||||||
}
|
|
||||||
else if (iPlayersSpectate + iFakesSpectate < 9)
|
|
||||||
{
|
|
||||||
max = 3;
|
|
||||||
}
|
|
||||||
if (GetRandomInt(0, 10) > max)
|
|
||||||
{
|
|
||||||
KickFakeFromSpec();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
KickFakeFromTeam();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
int last_in_team = 0;
|
||||||
|
int last_in_spec = 0;
|
||||||
public void SetFakeToSpectate()
|
|
||||||
{
|
|
||||||
for(int i = 1; i <= MaxClients; i++)
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if(IsClientConnected(i) && IsFakeClient(i) && !IsClientSourceTV(i) && GetClientTeam(i) >= CS_TEAM_T)
|
if (IsClientConnected(i) && IsClientInGame(i) && IsClientAuthorized(i))
|
||||||
{
|
{
|
||||||
ChangeClientTeam(i, CS_TEAM_SPECTATOR);
|
if (IsFakeClient(i) && !IsClientSourceTV(i))
|
||||||
break;
|
{
|
||||||
|
if (GetClientTeam(i) <= CS_TEAM_SPECTATOR)
|
||||||
|
{
|
||||||
|
fake_in_spec++;
|
||||||
|
last_in_spec = i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fake_in_team++;
|
||||||
|
last_in_team = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fake_in_spec > fake_in_team && last_in_spec != 0)
|
||||||
|
{
|
||||||
|
g_iLatency[last_in_spec] = 0;
|
||||||
|
KickClient(last_in_spec, "Disconnect by user.");
|
||||||
|
}
|
||||||
|
else if (last_in_team != 0)
|
||||||
|
{
|
||||||
|
g_iLatency[last_in_team] = 0;
|
||||||
|
KickClient(last_in_team, "Disconnect by user.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ManageFakes(int iPlayersSpectate, int iPlayersInTeam, int iFakesInTeam, int iFakesSpectate)
|
||||||
|
{
|
||||||
|
if (iPlayersSpectate + iPlayersInTeam + 4 < iFakesSpectate + iFakesInTeam)
|
||||||
|
{
|
||||||
|
KickFakes();
|
||||||
|
}
|
||||||
|
else if (iPlayersSpectate + iPlayersInTeam > iFakesSpectate + iFakesInTeam)
|
||||||
|
{
|
||||||
|
CreateFake();
|
||||||
|
int max = 3;
|
||||||
|
if (iPlayersSpectate + iFakesSpectate > 16)
|
||||||
|
{
|
||||||
|
max = 7;
|
||||||
|
}
|
||||||
|
if (GetRandomInt(0, 10) <= max)
|
||||||
|
{
|
||||||
|
SetFakeToTeam();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -539,32 +501,6 @@ public void SetFakeToTeam()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void KickFakeFromTeam()
|
|
||||||
{
|
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
|
||||||
{
|
|
||||||
if (IsClientConnected(i) && IsFakeClient(i) && !IsClientSourceTV(i) && GetClientTeam(i) > CS_TEAM_SPECTATOR)
|
|
||||||
{
|
|
||||||
g_iLatency[i] = 0;
|
|
||||||
KickClient(i, "Disconnect by user.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void KickFakeFromSpec()
|
|
||||||
{
|
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
|
||||||
{
|
|
||||||
if (IsClientConnected(i) && IsFakeClient(i) && !IsClientSourceTV(i) && GetClientTeam(i) <= CS_TEAM_SPECTATOR)
|
|
||||||
{
|
|
||||||
g_iLatency[i] = 0;
|
|
||||||
KickClient(i, "Disconnect by user.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CreateFake()
|
public void CreateFake()
|
||||||
{
|
{
|
||||||
if (g_hNames.Length == 0 || g_hClanNames.Length == 0)
|
if (g_hNames.Length == 0 || g_hClanNames.Length == 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user