2019-07-25 00:28:59 +02:00
|
|
|
#include <sourcemod>
|
2019-09-29 19:46:32 +02:00
|
|
|
#include <sdktools>
|
|
|
|
#include <cstrike>
|
2019-07-25 00:28:59 +02:00
|
|
|
|
|
|
|
#pragma semicolon 1
|
|
|
|
#pragma newdecls required
|
|
|
|
|
2019-09-01 14:01:29 +02:00
|
|
|
#define NUMBEROFNAMES 62
|
|
|
|
char g_cName[NUMBEROFNAMES][] = {"Dwelitram", "Gwyri", "Caredus", "Arerawia", "Vilali", "Astiwiel", "Vardonydd", "Ybaossa", "Umyk", "Nico50Pax", "Onand", "Thelian", "Nydaleth", "Chomarin", "Traedien", "Miev", "Kaaede", "Koamond", "TheRottenBenson", "BigLegend2017", "TRIGGEREDHarambexXx", "InPepe2016", "xXxMaster2012", "InBoixXx", "TheKopsing", "Cornelius", "Gustavo", "Bryant", "Winfred", "Nicolas", "Mitchel", "Dana", "Carrol", "Darell", "Ruben", "Jeromy", "Wade", "Scotty", "Salvatore", "Kory", "Don", "Morgan", "Kurtis", "Federico", "Darin", "css-ru", "aimbot", "lastkraftwagenfahrzeug", "edger", "clownface", "слово", "счастливый", "kara", "puta", "meow", "uncle sam", "FunBun", "Counter-Strike.Com.Ua", "For-css.Ru", "BOBO", "", "."};
|
2019-07-25 00:28:59 +02:00
|
|
|
|
2019-09-29 19:46:32 +02:00
|
|
|
bool g_bFakePopulation[MAXPLAYERS + 1];
|
2019-09-29 22:11:56 +02:00
|
|
|
bool g_bMapEnded;
|
2019-09-29 22:45:17 +02:00
|
|
|
int g_iBaseLatency[MAXPLAYERS + 1];
|
2019-09-29 19:46:32 +02:00
|
|
|
int g_iLatency[MAXPLAYERS + 1];
|
2019-09-29 22:11:56 +02:00
|
|
|
int g_iAdminFakes;
|
|
|
|
bool g_bCheckRequested;
|
2019-10-08 20:12:36 +02:00
|
|
|
//int g_iUserInfoStringTable;
|
2019-08-29 23:10:37 +02:00
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public Plugin myinfo =
|
|
|
|
{
|
|
|
|
name = "ImprovedHitboxes", //camouflage
|
2019-10-04 13:50:30 +02:00
|
|
|
author = "Neon + Dogan + Botox",
|
2019-08-25 02:40:15 +02:00
|
|
|
description = "Handle Hitboxes via Plugin",
|
2019-10-04 13:50:30 +02:00
|
|
|
version = "4.0",
|
2019-07-25 00:28:59 +02:00
|
|
|
url = "https://steamcommunity.com/id/n3ontm"
|
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void OnPluginStart()
|
|
|
|
{
|
2019-10-04 13:50:30 +02:00
|
|
|
RegAdminCmd("sm_debugfakes", Command_DebugFakes, ADMFLAG_RCON, "Shows the amount of fake-clients on server");
|
|
|
|
RegAdminCmd("sm_setfakes", Command_SetFakes, ADMFLAG_RCON, "Manually sets the amount of fake-clients");
|
|
|
|
RegAdminCmd("sm_fakes", Command_Fakes, ADMFLAG_RCON, "Shows the fake-clients on server");
|
2019-09-29 22:11:56 +02:00
|
|
|
|
|
|
|
g_iAdminFakes = -1;
|
|
|
|
g_bMapEnded = false;
|
2019-10-04 13:50:30 +02:00
|
|
|
CreateTimer(3.0, RandomizePing, _, TIMER_REPEAT);
|
2019-09-29 22:11:56 +02:00
|
|
|
|
|
|
|
RequestFrame(CheckPopulation);
|
2019-10-04 12:25:53 +02:00
|
|
|
|
2019-10-08 20:12:36 +02:00
|
|
|
//g_iUserInfoStringTable = FindStringTable("userinfo");
|
2019-07-25 00:28:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void OnPluginEnd()
|
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
2019-08-29 23:10:37 +02:00
|
|
|
if(g_bFakePopulation[i])
|
|
|
|
{
|
|
|
|
g_bFakePopulation[i] = false;
|
2019-09-29 19:46:32 +02:00
|
|
|
g_iLatency[i] = 0;
|
2019-10-09 22:13:06 +02:00
|
|
|
KickClient(i);
|
2019-08-29 23:10:37 +02:00
|
|
|
}
|
2019-08-25 02:40:15 +02:00
|
|
|
}
|
2019-07-25 00:28:59 +02:00
|
|
|
}
|
|
|
|
|
2019-09-29 22:11:56 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void OnMapStart()
|
|
|
|
{
|
|
|
|
g_bMapEnded = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void OnMapEnd()
|
|
|
|
{
|
|
|
|
g_bMapEnded = true;
|
2019-09-29 22:45:17 +02:00
|
|
|
g_iAdminFakes = -1;
|
|
|
|
}
|
2019-09-29 22:11:56 +02:00
|
|
|
|
2019-09-29 22:45:17 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public Action RandomizePing(Handle timer)
|
|
|
|
{
|
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
|
|
|
if(g_bFakePopulation[i])
|
|
|
|
g_iLatency[i] = g_iBaseLatency[i] + GetRandomInt(-3, 3);
|
|
|
|
}
|
2019-09-29 22:11:56 +02:00
|
|
|
}
|
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public Action Command_DebugFakes(int client, int argc)
|
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
int iFakes = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
int iFakesInTeam = 0;
|
|
|
|
|
2019-08-25 02:40:15 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
2019-08-29 23:10:37 +02:00
|
|
|
if (g_bFakePopulation[i])
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakes++;
|
2019-09-29 19:46:32 +02:00
|
|
|
|
|
|
|
if (g_bFakePopulation[i] && GetClientTeam(i) > 0)
|
|
|
|
iFakesInTeam++;
|
2019-08-25 02:40:15 +02:00
|
|
|
}
|
2019-09-29 19:46:32 +02:00
|
|
|
|
2019-10-04 13:50:30 +02:00
|
|
|
ReplyToCommand(client, "[SM] There are currently %d Fake-Clients, from which %d are in Spectate.", iFakes, iFakes - iFakesInTeam);
|
2019-09-29 19:46:32 +02:00
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
return Plugin_Handled;
|
|
|
|
}
|
|
|
|
|
2019-09-29 22:11:56 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
2019-10-04 12:28:35 +02:00
|
|
|
public Action Command_SetFakes(int client, int argc)
|
2019-09-29 22:11:56 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-04 13:50:30 +02:00
|
|
|
ReplyToCommand(client, "[SM] You set the amount of Fake-Clients to %d.", g_iAdminFakes);
|
2019-09-29 22:11:56 +02:00
|
|
|
CheckPopulation();
|
|
|
|
return Plugin_Handled;
|
2019-10-04 12:28:35 +02:00
|
|
|
}
|
2019-09-29 22:11:56 +02:00
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
2019-10-04 13:50:30 +02:00
|
|
|
public Action Command_Fakes(int client, int args)
|
|
|
|
{
|
|
|
|
char aBuf[1024];
|
|
|
|
char aBuf2[MAX_NAME_LENGTH];
|
|
|
|
|
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
|
|
|
if(IsClientInGame(i))
|
|
|
|
{
|
|
|
|
if(g_bFakePopulation[i])
|
|
|
|
{
|
|
|
|
GetClientName(i, aBuf2, sizeof(aBuf2));
|
|
|
|
StrCat(aBuf, sizeof(aBuf), aBuf2);
|
|
|
|
StrCat(aBuf, sizeof(aBuf), ", ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(strlen(aBuf))
|
|
|
|
{
|
|
|
|
aBuf[strlen(aBuf) - 2] = 0;
|
|
|
|
ReplyToCommand(client, "[SM] Fake-Clients online: %s", aBuf);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ReplyToCommand(client, "[SM] Fake-Clients online: none");
|
|
|
|
|
|
|
|
return Plugin_Handled;
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
2019-07-25 00:28:59 +02:00
|
|
|
public void OnClientConnected(int client)
|
|
|
|
{
|
2019-09-29 22:11:56 +02:00
|
|
|
if (!g_bCheckRequested && !IsFakeClient(client))
|
|
|
|
{
|
|
|
|
RequestFrame(CheckPopulation);
|
|
|
|
g_bCheckRequested = true;
|
|
|
|
}
|
2019-07-25 00:28:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void OnClientDisconnect(int client)
|
|
|
|
{
|
2019-08-29 23:10:37 +02:00
|
|
|
if (client > 0)
|
|
|
|
{
|
|
|
|
if(g_bFakePopulation[client])
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-29 23:10:37 +02:00
|
|
|
g_bFakePopulation[client] = false;
|
2019-09-29 19:46:32 +02:00
|
|
|
g_iLatency[client] = 0;
|
|
|
|
}
|
2019-08-29 23:10:37 +02:00
|
|
|
|
2019-09-29 22:11:56 +02:00
|
|
|
if (!g_bCheckRequested && !IsFakeClient(client))
|
|
|
|
{
|
|
|
|
RequestFrame(CheckPopulation);
|
|
|
|
g_bCheckRequested = true;
|
|
|
|
}
|
2019-08-29 23:10:37 +02:00
|
|
|
}
|
2019-07-25 00:28:59 +02:00
|
|
|
}
|
|
|
|
|
2019-10-07 01:53:24 +02:00
|
|
|
/*public void OnClientSettingsChanged(int client)
|
2019-10-04 12:25:53 +02:00
|
|
|
{
|
|
|
|
if(!g_bFakePopulation[client])
|
|
|
|
return;
|
|
|
|
|
2019-10-04 13:27:14 +02:00
|
|
|
int len = GetStringTableDataLength(g_iUserInfoStringTable, client - 1);
|
2019-10-04 12:25:53 +02:00
|
|
|
char[] aData = new char[len];
|
|
|
|
|
2019-10-04 13:27:14 +02:00
|
|
|
if(len < 106)
|
|
|
|
return;
|
|
|
|
|
|
|
|
GetStringTableData(g_iUserInfoStringTable, client - 1, aData, len);
|
2019-10-04 12:25:53 +02:00
|
|
|
|
|
|
|
// bool fakeplayer;
|
|
|
|
aData[105] = 0;
|
|
|
|
|
2019-10-04 13:27:14 +02:00
|
|
|
SetStringTableData(g_iUserInfoStringTable, client - 1, aData, len);
|
2019-10-07 01:53:24 +02:00
|
|
|
}*/
|
2019-10-04 12:25:53 +02:00
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
// Purpose:
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
|
|
public void CheckPopulation()
|
|
|
|
{
|
2019-09-29 22:11:56 +02:00
|
|
|
g_bCheckRequested = false;
|
|
|
|
|
|
|
|
if(g_bMapEnded)
|
|
|
|
return;
|
|
|
|
|
2019-10-08 20:12:36 +02:00
|
|
|
int iPlayers = GetClientCount(false);
|
|
|
|
|
2019-07-25 00:28:59 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
2019-10-08 20:12:36 +02:00
|
|
|
if(IsClientConnected(i) && IsFakeClient(i))
|
|
|
|
iPlayers--;
|
2019-07-25 00:28:59 +02:00
|
|
|
}
|
|
|
|
|
2019-08-29 23:10:37 +02:00
|
|
|
int iFakes = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
int iFakesInTeam = 0;
|
|
|
|
|
2019-08-25 02:40:15 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
2019-08-29 23:10:37 +02:00
|
|
|
if (g_bFakePopulation[i])
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakes++;
|
|
|
|
}
|
|
|
|
|
2019-08-29 23:10:37 +02:00
|
|
|
int iFakesNeeded = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
int iFakesInTeamNeeded = 0;
|
|
|
|
|
2019-09-01 14:01:29 +02:00
|
|
|
if (iPlayers > 61)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 0;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-10-08 20:12:36 +02:00
|
|
|
else if(iPlayers > 59)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 1;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 0;
|
2019-10-08 20:12:36 +02:00
|
|
|
}
|
|
|
|
else if(iPlayers > 57)
|
|
|
|
{
|
|
|
|
iFakesNeeded = 2;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 1;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-09-01 14:01:29 +02:00
|
|
|
else if(iPlayers > 55)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-10-08 20:12:36 +02:00
|
|
|
iFakesNeeded = 3;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 1;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-09-01 14:01:29 +02:00
|
|
|
else if (iPlayers > 20)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 4;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 2;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-09-01 14:01:29 +02:00
|
|
|
else if (iPlayers > 10)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 3;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 1;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-09-01 14:01:29 +02:00
|
|
|
else if (iPlayers > 5)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 2;
|
2019-10-09 22:13:06 +02:00
|
|
|
iFakesInTeamNeeded = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
}
|
2019-07-25 00:28:59 +02:00
|
|
|
else
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
2019-08-25 02:40:15 +02:00
|
|
|
iFakesNeeded = 0;
|
2019-09-29 19:46:32 +02:00
|
|
|
iFakesInTeamNeeded = 0;
|
|
|
|
}
|
2019-08-25 02:40:15 +02:00
|
|
|
|
2019-09-29 22:11:56 +02:00
|
|
|
if(g_iAdminFakes != -1)
|
|
|
|
iFakesNeeded = g_iAdminFakes;
|
|
|
|
|
2019-09-29 19:46:32 +02:00
|
|
|
if (iFakes != iFakesNeeded)
|
2019-08-25 02:40:15 +02:00
|
|
|
{
|
2019-09-29 19:46:32 +02:00
|
|
|
while (iFakes < iFakesNeeded)
|
|
|
|
{
|
|
|
|
int RandomName = GetRandomInt(0, NUMBEROFNAMES - 1);
|
|
|
|
int iIndex = CreateFakeClient(g_cName[RandomName]);
|
2019-09-29 22:45:17 +02:00
|
|
|
|
2019-10-09 22:13:06 +02:00
|
|
|
if(iIndex < 1 || iIndex > MaxClients)
|
|
|
|
return;
|
|
|
|
|
2019-09-29 22:45:17 +02:00
|
|
|
SetEntityFlags(iIndex, FL_CLIENT);
|
2019-09-29 22:11:56 +02:00
|
|
|
DispatchKeyValue(iIndex, "classname", "player");
|
|
|
|
DispatchSpawn(iIndex);
|
2019-09-29 22:45:17 +02:00
|
|
|
|
2019-09-29 19:46:32 +02:00
|
|
|
g_bFakePopulation[iIndex] = true;
|
2019-09-29 22:45:17 +02:00
|
|
|
g_iBaseLatency[iIndex] = GetRandomInt(20, 110);
|
|
|
|
g_iLatency[iIndex] = g_iBaseLatency[iIndex];
|
|
|
|
|
2019-09-29 19:46:32 +02:00
|
|
|
AdminId FakeAdmin = CreateAdmin();
|
|
|
|
SetAdminFlag(FakeAdmin, Admin_Custom6, true);
|
|
|
|
SetUserAdmin(iIndex, FakeAdmin, true);
|
|
|
|
CS_SetClientClanTag(iIndex, "UNLOZE");
|
|
|
|
iFakes++;
|
|
|
|
}
|
|
|
|
|
|
|
|
while (iFakes > iFakesNeeded)
|
|
|
|
{
|
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
|
|
|
if(g_bFakePopulation[i])
|
|
|
|
{
|
|
|
|
g_bFakePopulation[i] = false;
|
|
|
|
g_iLatency[i] = 0;
|
2019-10-09 22:13:06 +02:00
|
|
|
KickClient(i);
|
2019-09-29 19:46:32 +02:00
|
|
|
iFakes--;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-25 02:40:15 +02:00
|
|
|
}
|
2019-07-25 00:28:59 +02:00
|
|
|
|
2019-10-07 19:41:05 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
|
|
|
if (g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T)
|
|
|
|
iFakesInTeam++;
|
|
|
|
}
|
|
|
|
|
2019-10-04 14:01:12 +02:00
|
|
|
if (iFakes == iFakesNeeded && iFakesInTeam != iFakesInTeamNeeded && g_iAdminFakes == -1)
|
2019-08-25 02:40:15 +02:00
|
|
|
{
|
2019-10-07 19:41:05 +02:00
|
|
|
while (iFakesInTeam < iFakesInTeamNeeded)
|
2019-08-25 02:40:15 +02:00
|
|
|
{
|
2019-09-29 19:46:32 +02:00
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
2019-08-25 02:40:15 +02:00
|
|
|
{
|
2019-10-04 12:10:29 +02:00
|
|
|
if(g_bFakePopulation[i] && GetClientTeam(i) <= CS_TEAM_SPECTATOR)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
|
|
|
ChangeClientTeam(i, CS_TEAM_CT);
|
|
|
|
FakeClientCommandEx(i, "joinclass");
|
|
|
|
iFakesInTeam++;
|
|
|
|
break;
|
|
|
|
}
|
2019-08-25 02:40:15 +02:00
|
|
|
}
|
|
|
|
}
|
2019-09-29 19:46:32 +02:00
|
|
|
|
2019-10-07 19:41:05 +02:00
|
|
|
while (iFakesInTeam > iFakesInTeamNeeded)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
2019-10-04 12:10:29 +02:00
|
|
|
if(g_bFakePopulation[i] && GetClientTeam(i) >= CS_TEAM_T)
|
2019-09-29 19:46:32 +02:00
|
|
|
{
|
|
|
|
ChangeClientTeam(i, CS_TEAM_SPECTATOR);
|
|
|
|
iFakesInTeam--;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void OnGameFrame()
|
|
|
|
{
|
|
|
|
for(int i = 1; i <= MaxClients; i++)
|
|
|
|
{
|
|
|
|
if(g_bFakePopulation[i])
|
|
|
|
{
|
|
|
|
int iResEnt = GetPlayerResourceEntity();
|
|
|
|
|
|
|
|
if(iResEnt == -1)
|
|
|
|
return;
|
|
|
|
|
|
|
|
SetEntProp(iResEnt, Prop_Send, "m_iPing", g_iLatency[i], _, i);
|
|
|
|
}
|
2019-08-25 02:40:15 +02:00
|
|
|
}
|
2019-09-29 22:48:12 +02:00
|
|
|
}
|