diff --git a/FakePopulation/scripting/FakePopulation.sp b/FakePopulation/scripting/FakePopulation.sp index ef3a325c..d0fbc941 100644 --- a/FakePopulation/scripting/FakePopulation.sp +++ b/FakePopulation/scripting/FakePopulation.sp @@ -175,15 +175,18 @@ public void OnClientSettingsChanged(int client) if(!g_bFakePopulation[client]) return; - int len = GetStringTableDataLength(g_iUserInfoStringTable, client); + int len = GetStringTableDataLength(g_iUserInfoStringTable, client - 1); char[] aData = new char[len]; - GetStringTableData(g_iUserInfoStringTable, client, aData, len); + if(len < 106) + return; + + GetStringTableData(g_iUserInfoStringTable, client - 1, aData, len); // bool fakeplayer; aData[105] = 0; - SetStringTableData(g_iUserInfoStringTable, client, aData, len); + SetStringTableData(g_iUserInfoStringTable, client - 1, aData, len); } //----------------------------------------------------------------------------------------------------