local ffi = require 'ffi'
function FpsUnlock()
local versions = {
[0x31DF13] = 0x9D9D0, -- R1
[0x3195DD] = 0x9DB00, -- R2
[0xCC4D0] = 0xA1F60, -- R3
[0xFDB60] = 0xA2400 -- DL
}
local samp_base = getModuleHandle("samp.dll")
if samp_base == 0 then return end
local e_lfanew = ffi.cast("long*", samp_base + 60)[0]
local nt_header = samp_base + e_lfanew
local entry_point = ffi.cast("unsigned int*", nt_header + 40)[0]
local offset = versions[entry_point]
if offset then
writeMemory(samp_base + offset, 4, 0x5051FF15, true)
end
end
FpsUnlock()