michaelrw

teamfullfixer.sp

Jun 19th, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.91 KB | None | 0 0
  1. new Address:addy;
  2. new bool:Linux;
  3.  
  4. public OnPluginStart()
  5. {
  6.     addy = GameConfGetAddress(LoadGameConfigFile("TeamFullPatch2"), "TEAMFULL_2");
  7.    
  8.     if (GetEngineVersion() == Engine_CSS)
  9.     {
  10.         new OS = LoadFromAddress(addy + Address:1, NumberType_Int8);
  11.         switch(OS)
  12.         {
  13.             case 0x31: //Linux
  14.             {
  15.                 StoreToAddress(addy + Address:357, 0x90, NumberType_Int8);
  16.                 StoreToAddress(addy + Address:358, 0xE9, NumberType_Int8);
  17.                 Linux = true;
  18.             }
  19.             case 0x8B: //Windows
  20.             {
  21.                 StoreToAddress(addy + Address:687, 0xEB, NumberType_Int8);
  22.                 Linux = false;
  23.             }
  24.             default:
  25.             {
  26.                 SetFailState("TeamFullFix Signature Incorrect. (0x%x)", OS);
  27.             }
  28.         }
  29.     }
  30.     else if (GetEngineVersion() == Engine_CSGO)
  31.     {
  32.         new OS = LoadFromAddress(addy + Address:1, NumberType_Int8);
  33.         switch(OS)
  34.         {
  35.             case 0x89: //Linux
  36.             {
  37.                 StoreToAddress(addy + Address:242, 0x90, NumberType_Int8);
  38.                 StoreToAddress(addy + Address:243, 0xE9, NumberType_Int8);
  39.                 Linux = true;
  40.             }
  41.             case 0x8B: //Windows
  42.             {
  43.                 StoreToAddress(addy + Address:770, 0xEB, NumberType_Int8);
  44.                 Linux = false;
  45.             }
  46.             default:
  47.             {
  48.                 SetFailState("TeamFullFix Signature Incorrect. (0x%x)", OS);
  49.             }
  50.         }
  51.     }
  52.     else
  53.         SetFailState("GameMode Not Supported (%s)", GetEngineVersion());
  54. }
  55.  
  56. public OnPluginEnd()
  57. {
  58.     if (GetEngineVersion() == Engine_CSS)
  59.     {
  60.         if(Linux)
  61.         {
  62.             StoreToAddress(addy + Address:357, 0x0F, NumberType_Int8);
  63.             StoreToAddress(addy + Address:358, 0x84, NumberType_Int8);
  64.         }
  65.         else
  66.         {
  67.             StoreToAddress(addy + Address:687, 0x74, NumberType_Int8);
  68.         }
  69.     }
  70.     else if (GetEngineVersion() == Engine_CSGO)
  71.     {
  72.         if(Linux)
  73.         {
  74.             StoreToAddress(addy + Address:242, 0x0F, NumberType_Int8);
  75.             StoreToAddress(addy + Address:243, 0x84, NumberType_Int8);
  76.         }
  77.         else
  78.         {
  79.             StoreToAddress(addy + Address:770, 0x74, NumberType_Int8);
  80.         }
  81.     }
  82.     else
  83.         SetFailState("GameMode Not Supported (%s)", GetEngineVersion());
  84. }
Advertisement
Add Comment
Please, Sign In to add comment