- 50
- 2
говнокод, для тестов:
void removeVehicleLimits()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0x0E40E);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits2()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0x9F440);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits3()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0x9F46B);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits4()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0xA5461);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits5()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0xA5501);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits6()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0xA55A1);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits7()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0xA5641);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
void removeVehicleLimits8()
{
const uintptr_t address_vehicle =
reinterpret_cast<uintptr_t>(GetModuleHandleA("samp.dll")) + (0xB2D2F);
DWORD dwOldProtect_veh;
VirtualProtect((LPVOID)address_vehicle, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect_veh);
*reinterpret_cast<int32_t*>(address_vehicle) = 30000;
VirtualProtect((LPVOID)address_vehicle, 4, dwOldProtect_veh, &dwOldProtect_veh);
}
ида:
0x0E40E cmp eax, 263h
0x9F3AE cmp ax, 263h
0x9F440 cmp ax, 263h
0x9F46B cmp ax, 263h
0xA5461 cmp edx, 263h
0xA5501 cmp edx, 263h
0xA55A1 cmp edx, 263h
0xA5641 cmp edx, 263h
0xB2D2F cmp ax, 263h
0xB752F cmp ax, 263h
нашел все конструкции через ida pro под самп р3, которые содержат 263h (611) и решил прост заменить их на 30000 тем самым обойдя проверку тачек больше, чем 611, но игра прост виснет про спавне тачки вне 611, 12503 допустим, дело в том что я чет нахуячил в памяти или нет?