diff --git a/addons/sourcemod/scripting/FixServerLagExploit.sp b/addons/sourcemod/scripting/FixServerLagExploit.sp index fb2b68e..001e87a 100644 --- a/addons/sourcemod/scripting/FixServerLagExploit.sp +++ b/addons/sourcemod/scripting/FixServerLagExploit.sp @@ -1,49 +1,56 @@ #include -public Plugin:myinfo = +#pragma newdecls required + +public Plugin myinfo = { name = "[CSGO] Server Exploit Fix [5/28/2021]", author = "backwards", description = "Fixes Server Lag Exploit", - version = SOURCEMOD_VERSION, + version = "1.0.2", url = "http://www.steamcommunity.com/id/mypassword" } -Address:addy = view_as
(0); -Address:addy2 = view_as
(0); +Address addy = Address_Null; +Address addy2 = Address_Null; -public OnPluginStart() +public void OnPluginStart() { - Address:addy = GameConfGetAddress(LoadGameConfigFile("fixserverlagexploit.games"), "Unnamed"); - Address:addy2 = GameConfGetAddress(LoadGameConfigFile("fixserverlagexploit.games"), "Unnamed2"); + GameData hGameData = new GameData("fixserverlagexploit.games"); + if (hGameData == null) + SetFailState("Couldn't load \"fixserverlagexploit.games\" game config!"); + + addy = hGameData.GetAddress("Unnamed"); + addy2 = hGameData.GetAddress("Unnamed2"); + delete hGameData; - if(addy != view_as
(0)) + if(addy != Address_Null) { if (GetEngineVersion() == Engine_CSGO) { - new OS = LoadFromAddress(addy + Address:1, NumberType_Int8); + int OS = LoadFromAddress(addy + view_as
(1), NumberType_Int8); switch(OS) { case 0x89: //Linux { for(int i = 0;i<5;i++) - StoreToAddress(addy + Address:i + Address:0x31A, 0x90, NumberType_Int8); + StoreToAddress(addy + view_as
(i) + view_as
(0x31A), 0x90, NumberType_Int8); - if(addy2 != view_as
(0)) + if(addy2 != Address_Null) { for(int i = 0;i<5;i++) - StoreToAddress(addy2 + Address:i + Address:0x34, 0x90, NumberType_Int8); + StoreToAddress(addy2 + view_as
(i) + view_as
(0x34), 0x90, NumberType_Int8); } } case 0x8B: //Windows { for(int i = 0;i<6;i++) - StoreToAddress(addy + Address:i + Address:0x415, 0x90, NumberType_Int8); + StoreToAddress(addy + view_as
(i) + view_as
(0x415), 0x90, NumberType_Int8); - if(addy2 != view_as
(0)) + if(addy2 != Address_Null) { for(int i = 0;i<6;i++) - StoreToAddress(addy2 + Address:i + Address:0x48, 0x90, NumberType_Int8); + StoreToAddress(addy2 + view_as
(i) + view_as
(0x48), 0x90, NumberType_Int8); } } default: