local ffi = require("ffi")
function get_samp_version()
if samp_base == nil or samp_base == 0 then
samp_base = getModuleHandle("samp.dll")
end
if samp_base ~= 0 then
local e_lfanew = ffi.cast("long*", samp_base + 60)[0]
local nt_header = samp_base + e_lfanew
local entry_point_addr = ffi.cast("unsigned int*", nt_header + 40)[0]
if entry_point_addr == 0x31DF13 then
return "r1"
elseif entry_point_addr == 0xCC4D0 then
return "r3"
end
end
return "unknown"
end
function main()
while not isSampAvailable() do wait(0) end
local samp_version =...