- 274
- 54
hi, i need antiAFK bot but there afk is, like when u get text on screen u have to press Y or SPACE some ppl tried do that but they can't i have the code, but i can't activate it why?
This is the code, but i can't activate is 2 + photos of afk bot.
Lua:
local samp = require'lib.samp.events'
local memory = require "memory"
require "moonloader"
local state = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('aff', function() state = not state
if not state then
sampAddChatMessage('switch off', -1)
memory.setuint8(7634870, 0, false)
memory.setuint8(7635034, 0, false)
memory.hex2bin('0F 84 7B 01 00 00', 7623723, 8)
memory.hex2bin('50 51 FF 15 00 83 85 00', 5499528, 6)
else
sampAddChatMessage('switch on', -1)
memory.setuint8(7634870, 1, false)
memory.setuint8(7635034, 1, false)
memory.fill(7623723, 144, 8, false)
memory.fill(5499528, 144, 6, false)
end
end)
wait(-1)
end
function samp.onDisplayGameText(style, timer, text)
if state and text:find('Esate AFK') then
if text:find("Y") then
sendkey(VK_Y)
elseif text:find("Space")
sendkey(VK_SPACE)
end
end
end
function sendkey(a)
lua_thread.create(function()
setVirtualKeyDown(a,true)
wait(3000)
setVirtualKeyDown(a,false)
end)
end
This is the code, but i can't activate is 2 + photos of afk bot.
Вложения
Последнее редактирование модератором: