fastman92

GTASA, DynamicLimits::ms_VehicleStructsLimit

Feb 10th, 2015
233
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // Number of vehicle structs limit
  2.     unsigned int DynamicLimits::ms_VehicleStructsLimit = 50;
  3.  
  4.     __declspec(naked) void patch_vehicleStructs_005B8FDE()
  5.     {
  6.         __asm
  7.         {
  8.             push 00869A9Ch; // push "VehicleStruct"
  9.             push DynamicLimits::ms_VehicleStructsLimit;
  10.             mov ecx, eax;
  11.  
  12.             // go back
  13.             mov eax, 005B8FE7h;
  14.             jmp eax;
  15.         }
  16.     }
  17.  
  18.     // Vehicle structs
  19.     void DynamicLimits::SetVehicleStructs(int iVehicleStructs)
  20.     {
  21.         DynamicLimits::ms_VehicleStructsLimit = iVehicleStructs;
  22.  
  23.         CPatch::RedirectCode(0x5B8FDE, &patch_vehicleStructs_005B8FDE);
  24.  
  25.         CGenericLogStorage::SaveFormattedTextLn("Modified limit of VehicleStructs to: %d", iVehicleStructs);
  26.         CGenericLogStorage::WriteLineSeparator();
  27.     }
RAW Paste Data