#include "main.h"
inline void ahook() {
_asm {
pushfd
pushad
lea eax, [esi + 0x50]
cmp eax, [0x0B7C4F0]
je m1
popad
popfd
fstp dword ptr[esi + 0x50]
jmp m2
m1 :
mov edx, [eax]
fstp dword ptr[esi + 0x50]
mov[eax], edx
popad
popfd
m2 :
fld dword ptr[esp + 0x18]
}
_asm {
mov edx, 0x55FCCF
jmp edx
nop
}
};
/*
:NONAME_13003
if and
0AF0: 0@ = get_int_from_ini_file "cleo\Mix Sets.ini" section "Graphics" key "DisaBirds"
0@ == 1
else_jump @NONAME_13080
0A8C: write_memory 5497200 size 5 value 144 virtual_protect 1
:NONAME_13080
if and
0AF0: 0@ =...
#include "main.h"
inline void ahook() {
_asm {
pushfd
pushad
lea eax, [esi + 0x50]
cmp eax, [0x0B7C4F0]
je m1
popad
popfd
fstp dword ptr[esi + 0x50]
jmp m2
m1 :
mov edx, [eax]
fstp dword ptr[esi + 0x50]
mov[eax], edx
popad
popfd
m2 :
fld dword ptr[esp + 0x18]
}
_asm {
mov edx, 0x55FCCF
jmp edx
nop
}
};
/*
:NONAME_13003
if and
0AF0: 0@ = get_int_from_ini_file "cleo\Mix Sets.ini" section "Graphics" key "DisaBirds"
0@ == 1
else_jump @NONAME_13080
0A8C: write_memory 5497200 size 5 value 144 virtual_protect 1
:NONAME_13080
if and
0AF0: 0@ = get_int_from_ini_file "cleo\Mix Sets.ini" section "Graphics" key "DisaLowCloud"
0@ == 1
else_jump @NONAME_13160
0A8C: write_memory 5497121 size 5 value 144 virtual_protect 1
*/
void CLQFramerate::initPatchSet() {
LQ_init_sock();
/*
Base address: 0x07060000, SA:MP base address: 0x03BD0000 9D9D2 FPS1
Exception at address: 0x03C6D9D2 Offset: 0xFCC0D9D2
*/
DWORD old;
VirtualProtect((LPVOID)0x53E227, 1, PAGE_READWRITE, &old);
if ((*(byte*)0x53E227) != 0x0C3) {
*(byte*)0x53E227 = 0x0C3;//53E94C
}
DWORD fpsupaddr = g_dwSAMP_Addr + 0x9D9D0;
VirtualProtect((LPVOID)fpsupaddr, sizeof(int), PAGE_EXECUTE_READWRITE, &old);
*(int *)fpsupaddr = 0x5051FF15;
VirtualProtect((LPVOID)fpsupaddr, sizeof(int), old, NULL);
VirtualProtect((LPVOID)0x53E227, 1, old, NULL);
effects.push_back(patch_set() = {
"se1",
0,
0,
{
{ 4, (void*)(0x726CE2), NULL,
(uint8_t*)"\x00\x00\x00\x00", NULL }
}
});
effects.push_back(patch_set() = {
"se2",
0,
0,
{
{ 4, (void*)(0x49F4A5), NULL,
(uint8_t*)"\x00\x00\x00\x00", NULL }
}
});
//0x49F4A5
effects.push_back(patch_set() = {
"se3",
0,
0,
{
{ 4, (void*)(0x49F57E), NULL,
(uint8_t*)"\x00\x00\x00\x00", NULL }
}
});
//0x49F57E
effects.push_back(patch_set() = {
"se4",
0,
0,
{
{ 4, (void*)(0x5458D6), NULL,
(uint8_t*)"\x00\x00\x00\x00", NULL }
}
});
//0x5458D6
effects.push_back(patch_set() = {
"se5",
0,
0,
{
{ 4, (void*)(0x49EE64), NULL,
(uint8_t*)"\x00\x00\x00\x00", NULL }
}
});
/*
fps.push_back(patch_set() = {
"fps1",
0,
0,
{
{ 4, (void*)(g_dwSAMP_Addr + 0x9D9D0), NULL,
(uint8_t*)"\x50\x51\xFF\x15", NULL }
}
});
*/
/*
VirtualProtect((LPVOID)0xBAB318, sizeof(int), PAGE_READWRITE, &old);
*(byte*)0xBAB318 = 0;
VirtualProtect((LPVOID)0xBAB318, sizeof(int), old, NULL);
*/
fps.push_back(patch_set() = {
"fps2",
0,
0,
{
{ 1, (void*)(0xBAB318), NULL,
(uint8_t*)"\x00", NULL }
}
});
/*
Задержка между выводом очередного кадра (FPS delay).
VirtualProtect((LPVOID)0x53E94C, sizeof(int), PAGE_READWRITE, &old);
*(byte*)0x53E94C = 0;
VirtualProtect((LPVOID)0x53E94C, sizeof(int), old, NULL);
*/
fps.push_back(patch_set() = {
"fps3",
0,
0,
{
{ 1, (void*)(0x53E94C), NULL,
(uint8_t*)"\x00", NULL }
}
});
fuck_surf = { //ghost thx
"fuck_surf",
0,
0,
{
{ 12, (void*)(g_dwSAMP_Addr + 0x38CF), NULL,
(uint8_t*)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90", NULL }
}
};
memory512 = {
"memory512",
0,
0,
{
{ 4, (void*)(0x8A5A80), NULL,
(uint8_t*)"\x20\x00\x00\x00", NULL }
}
};
/*
BulletSparkForc = 0 # Количество/скорость искр, возникающих при стрельбе из оружия. Стандартное значение - 3.0.
BulletSparkSprd = 0 # Разброс искр, возникающих при стрельбе из оружия. Стандартное значение - 0.4.
BulletDustSize = 0 # Размер партикла пыли, вызванного стрельбой по земле или песку. Стандартное значение - 0.4. Уменьшение к выигрышу FPS не приводит.
*/
//70BEB6[basic] 70BEA7[this equal a basic in square(basic*basic)] Vehicle shadows let it be a one 1.0f
//70BE79[basic] 70BE88[basic^2] Planes shadows distance
//8D5240[basic] C4B6B0[basic^2] Peds shadows distance
//49F47B bullet spark
//49F451 bullet spark
//49F57E 49F4A5 bullet dust
shadows.push_back(patch_set() = {
"shadow_vehicle",
0,
0,
{
{ 1, (void*)(0x70BEB6), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
shadows.push_back(patch_set() = {
"shadow_vehicle_square",
0,
0,
{
{ 1, (void*)(0x70BEA7), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
shadows.push_back(patch_set() = {
"shadow_planes",
0,
0,
{
{ 1, (void*)(0x70BE79), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
shadows.push_back(patch_set() = {
"shadow_planes_square",
0,
0,
{
{ 1, (void*)(0x70BE88), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
shadows.push_back(patch_set() = {
"shadow_peds",
0,
0,
{
{ 1, (void*)(0x8D5240), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
shadows.push_back(patch_set() = {
"shadow_peds_square",
0,
0,
{
{ 1, (void*)(0xC4B6B0), NULL,
(uint8_t*)(new float(1.0f)), NULL }
}
});
bullet_effects.push_back(patch_set() = {
"bullet_effects1",
0,
0,
{
{ 1, (void*)(0x49F47B), NULL,
(uint8_t*)(new float(0.0f)), NULL }
}
});
bullet_effects.push_back(patch_set() = {
"bullet_effects2",
0,
0,
{
{ 1, (void*)(0x49F451), NULL,
(uint8_t*)(new float(0.0f)), NULL }
}
});
bullet_effects.push_back(patch_set() = {
"bullet_dust1",
0,
0,
{
{ 1, (void*)(0x49F57E), NULL,
(uint8_t*)(new float(0.0f)), NULL }
}
});
bullet_effects.push_back(patch_set() = {
"bullet_dust2",
0,
0,
{
{ 1, (void*)(0x49F4A5), NULL,
(uint8_t*)(new float(0.0f)), NULL }
}
});
}
bool CLQFramerate::getStatePostEffects() {
return post_effects;
}
void CLQFramerate::toggleStatePostEffects() {
CPostEffects__m_bDisableAllPostEffect = !post_effects;
post_effects ^= true;
}
void CLQFramerate::fogPatch() {
Hook hk;
uint32_t _0 = (uint32_t)(&ahook) + 6;
hk.JMP((DWORD*)(0x55FCC8), (DWORD*)_0, 4);
DWORD lold;
VirtualProtect((LPVOID)0x0055FCCD, 2, PAGE_EXECUTE_READWRITE, &lold);
*(short*)0x0055FCCD = 0x9090;
VirtualProtect((LPVOID)0x0055FCCD, 2, lold, NULL);
fog_patched = true;
fog = true;
}
void CLQFramerate::fpsPatch() {
/*
DWORD old;
DWORD fpsupaddr = g_dwSAMP_Addr + 0x9D9D0;
VirtualProtect((LPVOID)fpsupaddr, sizeof(int), PAGE_EXECUTE_READWRITE, &old);
*(int *)fpsupaddr = 0x5051FF15;
VirtualProtect((LPVOID)fpsupaddr, sizeof(int), old, NULL);
*/
if(fps.size() > 0)
for(int i = 0; i < fps.size(); i++)
patcher_install(&fps[i]);
fpsmix = true;
//fog = false;
}
void CLQFramerate::fpsDispatch() {
for (int i = 0; i < fps.size(); i++)
patcher_remove(&fps[i]);
fpsmix = false;
}
void CLQFramerate::memory512Patch() {
//*(int*)0x8A5A80 = 0x20000000;
/*
VirtualProtect((LPVOID)0x8A5A80, sizeof(int), PAGE_READWRITE, &old);
*(int*)0x8A5A80 = 0x20000000;
VirtualProtect((LPVOID)0x8A5A80, sizeof(int), old, NULL);
*/
patcher_install(&memory512);
memory_512 = true;
}
void CLQFramerate::memory512Dispatch() {
patcher_remove(&memory512);
memory_512 = false;
}
void CLQFramerate::someEffectsPatch() {
if(effects.size() > 0)
for (int i = 0; i < effects.size(); i++)
patcher_install(&effects[i]);
someeffects = true;
}
void CLQFramerate::someEffectsDispatch() {
for (int i = 0; i < effects.size(); i++)
patcher_remove(&effects[i]);
someeffects = false;
}
void CLQFramerate::surfPatch() {
patcher_install(&fuck_surf);
}
void CLQFramerate::surfDispatch() {
patcher_remove(&fuck_surf);
}
void CLQFramerate::shadowsPatch() {
for (int i = 0; i < shadows.size(); i++)
patcher_install(&shadows[i]);
shadows_off = true;
}
void CLQFramerate::shadowsDispatch() {
for (int i = 0; i < shadows.size(); i++)
patcher_remove(&shadows[i]);
shadows_off = false;
}
void CLQFramerate::bulletEffPatch()
{
for (int i = 0; i < bullet_effects.size(); i++)
patcher_install(&bullet_effects[i]);
bullet_eff = true;
}
void CLQFramerate::bulletEffDispatch()
{
for (int i = 0; i < bullet_effects.size(); i++)
patcher_remove(&bullet_effects[i]);
bullet_eff = false;
}
void CLQFramerate::doProc() {
if (fog) {
DWORD old;
VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_EXECUTE_READWRITE, &old);
float currdist = *(float *)0xB7C4F0;
VirtualProtect((LPVOID)0xB7C4F0, 4, old, NULL);
if (currdist != LiquidMod->Misc.fog_dist) {
DWORD nold;
VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_EXECUTE_READWRITE, &nold);
*(float*)0xB7C4F0 = LiquidMod->Misc.fog_dist;
VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_READONLY, NULL);
}
}
}
разве тут не убирает все эффекты от пули?на из ликвида почекайliquid fpsups:#include "main.h" inline void ahook() { _asm { pushfd pushad lea eax, [esi + 0x50] cmp eax, [0x0B7C4F0] je m1 popad popfd fstp dword ptr[esi + 0x50] jmp m2 m1 : mov edx, [eax] fstp dword ptr[esi + 0x50] mov[eax], edx popad popfd m2 : fld dword ptr[esp + 0x18] } _asm { mov edx, 0x55FCCF jmp edx nop } }; /* :NONAME_13003 if and 0AF0: 0@ = get_int_from_ini_file "cleo\Mix Sets.ini" section "Graphics" key "DisaBirds" 0@ == 1 else_jump @NONAME_13080 0A8C: write_memory 5497200 size 5 value 144 virtual_protect 1 :NONAME_13080 if and 0AF0: 0@ = get_int_from_ini_file "cleo\Mix Sets.ini" section "Graphics" key "DisaLowCloud" 0@ == 1 else_jump @NONAME_13160 0A8C: write_memory 5497121 size 5 value 144 virtual_protect 1 */ void CLQFramerate::initPatchSet() { LQ_init_sock(); /* Base address: 0x07060000, SA:MP base address: 0x03BD0000 9D9D2 FPS1 Exception at address: 0x03C6D9D2 Offset: 0xFCC0D9D2 */ DWORD old; VirtualProtect((LPVOID)0x53E227, 1, PAGE_READWRITE, &old); if ((*(byte*)0x53E227) != 0x0C3) { *(byte*)0x53E227 = 0x0C3;//53E94C } DWORD fpsupaddr = g_dwSAMP_Addr + 0x9D9D0; VirtualProtect((LPVOID)fpsupaddr, sizeof(int), PAGE_EXECUTE_READWRITE, &old); *(int *)fpsupaddr = 0x5051FF15; VirtualProtect((LPVOID)fpsupaddr, sizeof(int), old, NULL); VirtualProtect((LPVOID)0x53E227, 1, old, NULL); effects.push_back(patch_set() = { "se1", 0, 0, { { 4, (void*)(0x726CE2), NULL, (uint8_t*)"\x00\x00\x00\x00", NULL } } }); effects.push_back(patch_set() = { "se2", 0, 0, { { 4, (void*)(0x49F4A5), NULL, (uint8_t*)"\x00\x00\x00\x00", NULL } } }); //0x49F4A5 effects.push_back(patch_set() = { "se3", 0, 0, { { 4, (void*)(0x49F57E), NULL, (uint8_t*)"\x00\x00\x00\x00", NULL } } }); //0x49F57E effects.push_back(patch_set() = { "se4", 0, 0, { { 4, (void*)(0x5458D6), NULL, (uint8_t*)"\x00\x00\x00\x00", NULL } } }); //0x5458D6 effects.push_back(patch_set() = { "se5", 0, 0, { { 4, (void*)(0x49EE64), NULL, (uint8_t*)"\x00\x00\x00\x00", NULL } } }); /* fps.push_back(patch_set() = { "fps1", 0, 0, { { 4, (void*)(g_dwSAMP_Addr + 0x9D9D0), NULL, (uint8_t*)"\x50\x51\xFF\x15", NULL } } }); */ /* VirtualProtect((LPVOID)0xBAB318, sizeof(int), PAGE_READWRITE, &old); *(byte*)0xBAB318 = 0; VirtualProtect((LPVOID)0xBAB318, sizeof(int), old, NULL); */ fps.push_back(patch_set() = { "fps2", 0, 0, { { 1, (void*)(0xBAB318), NULL, (uint8_t*)"\x00", NULL } } }); /* Задержка между выводом очередного кадра (FPS delay). VirtualProtect((LPVOID)0x53E94C, sizeof(int), PAGE_READWRITE, &old); *(byte*)0x53E94C = 0; VirtualProtect((LPVOID)0x53E94C, sizeof(int), old, NULL); */ fps.push_back(patch_set() = { "fps3", 0, 0, { { 1, (void*)(0x53E94C), NULL, (uint8_t*)"\x00", NULL } } }); fuck_surf = { //ghost thx "fuck_surf", 0, 0, { { 12, (void*)(g_dwSAMP_Addr + 0x38CF), NULL, (uint8_t*)"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90", NULL } } }; memory512 = { "memory512", 0, 0, { { 4, (void*)(0x8A5A80), NULL, (uint8_t*)"\x20\x00\x00\x00", NULL } } }; /* BulletSparkForc = 0 # Количество/скорость искр, возникающих при стрельбе из оружия. Стандартное значение - 3.0. BulletSparkSprd = 0 # Разброс искр, возникающих при стрельбе из оружия. Стандартное значение - 0.4. BulletDustSize = 0 # Размер партикла пыли, вызванного стрельбой по земле или песку. Стандартное значение - 0.4. Уменьшение к выигрышу FPS не приводит. */ //70BEB6[basic] 70BEA7[this equal a basic in square(basic*basic)] Vehicle shadows let it be a one 1.0f //70BE79[basic] 70BE88[basic^2] Planes shadows distance //8D5240[basic] C4B6B0[basic^2] Peds shadows distance //49F47B bullet spark //49F451 bullet spark //49F57E 49F4A5 bullet dust shadows.push_back(patch_set() = { "shadow_vehicle", 0, 0, { { 1, (void*)(0x70BEB6), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); shadows.push_back(patch_set() = { "shadow_vehicle_square", 0, 0, { { 1, (void*)(0x70BEA7), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); shadows.push_back(patch_set() = { "shadow_planes", 0, 0, { { 1, (void*)(0x70BE79), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); shadows.push_back(patch_set() = { "shadow_planes_square", 0, 0, { { 1, (void*)(0x70BE88), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); shadows.push_back(patch_set() = { "shadow_peds", 0, 0, { { 1, (void*)(0x8D5240), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); shadows.push_back(patch_set() = { "shadow_peds_square", 0, 0, { { 1, (void*)(0xC4B6B0), NULL, (uint8_t*)(new float(1.0f)), NULL } } }); bullet_effects.push_back(patch_set() = { "bullet_effects1", 0, 0, { { 1, (void*)(0x49F47B), NULL, (uint8_t*)(new float(0.0f)), NULL } } }); bullet_effects.push_back(patch_set() = { "bullet_effects2", 0, 0, { { 1, (void*)(0x49F451), NULL, (uint8_t*)(new float(0.0f)), NULL } } }); bullet_effects.push_back(patch_set() = { "bullet_dust1", 0, 0, { { 1, (void*)(0x49F57E), NULL, (uint8_t*)(new float(0.0f)), NULL } } }); bullet_effects.push_back(patch_set() = { "bullet_dust2", 0, 0, { { 1, (void*)(0x49F4A5), NULL, (uint8_t*)(new float(0.0f)), NULL } } }); } bool CLQFramerate::getStatePostEffects() { return post_effects; } void CLQFramerate::toggleStatePostEffects() { CPostEffects__m_bDisableAllPostEffect = !post_effects; post_effects ^= true; } void CLQFramerate::fogPatch() { Hook hk; uint32_t _0 = (uint32_t)(&ahook) + 6; hk.JMP((DWORD*)(0x55FCC8), (DWORD*)_0, 4); DWORD lold; VirtualProtect((LPVOID)0x0055FCCD, 2, PAGE_EXECUTE_READWRITE, &lold); *(short*)0x0055FCCD = 0x9090; VirtualProtect((LPVOID)0x0055FCCD, 2, lold, NULL); fog_patched = true; fog = true; } void CLQFramerate::fpsPatch() { /* DWORD old; DWORD fpsupaddr = g_dwSAMP_Addr + 0x9D9D0; VirtualProtect((LPVOID)fpsupaddr, sizeof(int), PAGE_EXECUTE_READWRITE, &old); *(int *)fpsupaddr = 0x5051FF15; VirtualProtect((LPVOID)fpsupaddr, sizeof(int), old, NULL); */ if(fps.size() > 0) for(int i = 0; i < fps.size(); i++) patcher_install(&fps[i]); fpsmix = true; //fog = false; } void CLQFramerate::fpsDispatch() { for (int i = 0; i < fps.size(); i++) patcher_remove(&fps[i]); fpsmix = false; } void CLQFramerate::memory512Patch() { //*(int*)0x8A5A80 = 0x20000000; /* VirtualProtect((LPVOID)0x8A5A80, sizeof(int), PAGE_READWRITE, &old); *(int*)0x8A5A80 = 0x20000000; VirtualProtect((LPVOID)0x8A5A80, sizeof(int), old, NULL); */ patcher_install(&memory512); memory_512 = true; } void CLQFramerate::memory512Dispatch() { patcher_remove(&memory512); memory_512 = false; } void CLQFramerate::someEffectsPatch() { if(effects.size() > 0) for (int i = 0; i < effects.size(); i++) patcher_install(&effects[i]); someeffects = true; } void CLQFramerate::someEffectsDispatch() { for (int i = 0; i < effects.size(); i++) patcher_remove(&effects[i]); someeffects = false; } void CLQFramerate::surfPatch() { patcher_install(&fuck_surf); } void CLQFramerate::surfDispatch() { patcher_remove(&fuck_surf); } void CLQFramerate::shadowsPatch() { for (int i = 0; i < shadows.size(); i++) patcher_install(&shadows[i]); shadows_off = true; } void CLQFramerate::shadowsDispatch() { for (int i = 0; i < shadows.size(); i++) patcher_remove(&shadows[i]); shadows_off = false; } void CLQFramerate::bulletEffPatch() { for (int i = 0; i < bullet_effects.size(); i++) patcher_install(&bullet_effects[i]); bullet_eff = true; } void CLQFramerate::bulletEffDispatch() { for (int i = 0; i < bullet_effects.size(); i++) patcher_remove(&bullet_effects[i]); bullet_eff = false; } void CLQFramerate::doProc() { if (fog) { DWORD old; VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_EXECUTE_READWRITE, &old); float currdist = *(float *)0xB7C4F0; VirtualProtect((LPVOID)0xB7C4F0, 4, old, NULL); if (currdist != LiquidMod->Misc.fog_dist) { DWORD nold; VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_EXECUTE_READWRITE, &nold); *(float*)0xB7C4F0 = LiquidMod->Misc.fog_dist; VirtualProtect((LPVOID)0xB7C4F0, 4, PAGE_READONLY, NULL); } } }
там по описанию посмотри, тебе только один нужен так торазве тут не убирает все эффекты от пули?