require 'samp.packet'
local memory, enabled = require 'memory', false
script_properties("work-in-pause")
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("aaf", function()
enabled = not enabled
if enabled then
memory.write(0x747FB6, 0x1, 1, true)
memory.write(0x74805A, 0x1, 1, true)
memory.fill(0x74542B, 0x90, 8, true)
memory.fill(0x53EA88, 0x90, 6, true)
sampAddChatMessage("[ARZ] Anti-AFK {0AFF0A} activated", -1)
else
memory.write(0x747FB6, 0x0, 1, true)
memory.write(0x74805A, 0x0, 1, true)
arr = { 0x50, 0x51, 0xFF, 0x15, 0x00, 0x83, 0x85, 0x00 }
for i = 1, #arr do memory.write(0x74542B + i - 1, arr[i], 1, true) end
arr = { 0x0F, 0x84, 0x7B, 0x01, 0x00, 0x00 }
for i = 1, #arr do memory.write(0x53EA88 + i - 1, arr[i], 1, true) end
sampAddChatMessage("[ARZ] Anti-AFK {FF0A0A} deactivated", -1)
end
end)
while true do wait(700) if enabled then samp_create_sync_data('player').send() end end
end