Исходник Lua vertical sensitivity fix

Статус
В этой теме нельзя размещать новые ответы.

Jonni_

Новичок
Автор темы
1
0
Made a Lua script to fix vertical sensitivity (It doesn't change when changing sensitivity in the settings)
 

Вложения

  • SensitivityFix.lua
    225 байт · Просмотры: 268

imring

Ride the Lightning
Всефорумный модератор
2,355
2,517
Lua:
function main()
    local HSens = readMemory(0xB6EC1C, 4, 0)
    local VSens = readMemory(0xB6EC18, 4, 0)
    if VSens ~= HSens then
        writeMemory(0xB6EC18, 4, HSens, 0)
    end
    wait(-1)
end
 
  • Нравится
Реакции: Qsany

LUCHARE

Известный
Друг
545
688
Lua:
function main()
    local HSens = readMemory(0xB6EC1C, 4, 0)
    local VSens = readMemory(0xB6EC18, 4, 0)
    if VSens ~= HSens then
        writeMemory(0xB6EC18, 4, HSens, 0)
    end
    wait(-1)
end
угадай что будет если изменить сенсу в настройках

It doesn't change when changing sensitivity in the settings
Lua:
script_author("LUCHARE")

local mem = require 'memory'

-- gta_sa.exe+12228C - D8 0D 18ECB600 - fmul dword ptr [gta_sa.exe+76EC18] ( target )

function onScriptLoad(scr)
    if (scr.name == thisScript().name) then
        mem.setuint32((0x0052228C + 0x2), 0xB6EC1C) -- ptr to vertical mouse acceleration -> ptr to horizontal
    end
end

function main() wait(-1) end

function onScriptTerminate(scr, q)
    if (scr.name == thisScript().name) then
        mem.setuint32((0x0052228C + 0x2), 0xB6EC18) -- patch annulment
    end
end
 

AnWu

Guardian of Order
Всефорумный модератор
4,689
5,200
угадай что будет если изменить сенсу в настройках


Lua:
script_author("LUCHARE")

local mem = require 'memory'

-- gta_sa.exe+12228C - D8 0D 18ECB600 - fmul dword ptr [gta_sa.exe+76EC18] ( target )

function onScriptLoad(scr)
    if (scr.name == thisScript().name) then
        mem.setuint32((0x0052228C + 0x2), 0xB6EC1C) -- ptr to vertical mouse acceleration -> ptr to horizontal
    end
end

function main() wait(-1) end

function onScriptTerminate(scr, q)
    if (scr.name == thisScript().name) then
        mem.setuint32((0x0052228C + 0x2), 0xB6EC18) -- patch annulment
    end
end
говорят можно сравнивать идефикаторы суриптов а не их именв. например сработает дважды если 2 названия совпадут.
 

AnWu

Guardian of Order
Всефорумный модератор
4,689
5,200
это будет работать только если в script_name указать название вместе с расширением файла
тем не менее просто убери .name. все будет работать так ток надежно. не подавай плохой пример.
 
  • Нравится
Реакции: LUCHARE
Статус
В этой теме нельзя размещать новые ответы.