diff --git a/FakePopulation/scripting/FakePopulation.sp b/FakePopulation/scripting/FakePopulation.sp index 3e773e8f..2ed367bc 100644 --- a/FakePopulation/scripting/FakePopulation.sp +++ b/FakePopulation/scripting/FakePopulation.sp @@ -14,6 +14,7 @@ int g_iBaseLatency[MAXPLAYERS + 1]; int g_iLatency[MAXPLAYERS + 1]; int g_iAdminFakes; bool g_bCheckRequested; +int g_iUserInfoStringTable; //---------------------------------------------------------------------------------------------------- // Purpose: @@ -40,6 +41,8 @@ public void OnPluginStart() CreateTimer(1.0, RandomizePing, _, TIMER_REPEAT); RequestFrame(CheckPopulation); + + g_iUserInfoStringTable = FindStringTable("userinfo"); } //---------------------------------------------------------------------------------------------------- @@ -167,6 +170,22 @@ public void OnClientDisconnect(int client) } } +public void OnClientSettingsChanged(int client) +{ + if(!g_bFakePopulation[client]) + return; + + int len = GetStringTableDataLength(g_iUserInfoStringTable, client); + char[] aData = new char[len]; + + GetStringTableData(g_iUserInfoStringTable, client, aData, len); + + // bool fakeplayer; + aData[105] = 0; + + SetStringTableData(g_iUserInfoStringTable, client, aData, len); +} + //---------------------------------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------------------------------