- 165
- 8
- Версия MoonLoader
- .027.0-preview
Lua:
function main()
while not isSampAvailable() do wait(200) end
while not sampIsLocalPlayerSpawned() do wait(200) end
sampRegisterChatCommand('pickupid', on)
while true do wait(0)
end
end
function on()
pickupid(1239)
if resultpick then
sampAddChatMessage(id)
end
end
function pickupid(model)
local poolPtr = sampGetPickupPoolPtr()
local ptwo = readMemory(poolPtr, 4, 0)
if ptwo > 0 then
ptwo = poolPtr + 0x4
local pthree = poolPtr + 0xF004
for id = 1, 4096 do
local pfive = readMemory(ptwo + id * 4, 4, false)
if pfive < 0 or pfive > 0 then
pfive = readMemory(pthree + id * 20, 4, false)
if pfive == model then
return id
end
end
end
end
end