Lua:
function is_cp_active()
local handle= loadDynamicLibrary("samp.dll")
local cpmemory = handle + 0x21A10C
cpmemory= readMemory(cpmemory, 4, 0)
cpmemory = cpmemory + 0x24
cpmemory = readMemory(cpmemory, 4, 0)
if cpmemory == true then return true
else
return false
end
freeDynamicLibrary(handle)
end
function get_cp_pos()
local handle = loadDynamicLibrary("samp.dll")
local cpmemory = handle + 0x21A10C
local X = readMemory(cpmemory, 4, 0)
cpmemory = cpmemory + 0xC
local Y = readMemory(cpmemory, 4, 0)
cpmemory= cpmemory + 0x4
local Z = readMemory(cpmemory, 4, 0)
cpmemory = cpmemory + 0x4
local finalRead = readMemory(cpmemory, 4, 0)
freeDynamicLibrary(handle)
end
--USAGE
if is_cp_active() then
get_cp_pos(X, Y, Z)
end