local memory = require 'memory'
local key = require 'vkeys'
old = {}
Fps = true -- false - unlock выключен при старте, true - включен
function main()
if sampGetBase() ~= nil then
old[1] = memory.read(sampGetBase() + 0x9D9D0, 4, true)
old[2] = memory.read(0xBAB318, 1, true)
old[3] = memory.read(0x53E94C, 1, true)
else thisScript():unload()
end
toggleUnlock()
while true do wait(0)
if isKeyDown(key.VK_CONTROL) and isKeyJustPressed(key.VK_E) then toggleUnlock() end -- ctrl + e
end
end
function toggleUnlock()
sampfuncsLog('FPS Unlock '..(Fps and 'on' or 'off'))
if Fps then
memory.write(sampGetBase() + 0x9D9D0, 0x5051FF15, 4, true)
memory.write(0xBAB318, 0, 1, true)
memory.write(0x53E94C, 0, 1, true)
else
memory.write(sampGetBase() + 0x9D9D0, old[1], 4, true)
memory.write(0xBAB318, old[2], 1, true)
memory.write(0x53E94C, old[3], 1, true)
end
Fps = not Fps
end