Script spams Y or press SPACE when Chat is OPEN!

nalbuphine

Новичок
Автор темы
1
0
en:
why does the script spam when there is no afk text or every 1-2 seconds writes Y to the chat? or for example, space is pressed? I understand that the script is trying to detect y or space? and then press it? because it is written that when you write something and the script automatically presses Y or SPACE, is it possible to somehow remove this or make the script see Y or SPACE as a green button to press?

this is what one guy said
you need to align the text
so that random doesn't slide when 2087 appears


but how i can do that?



ru:
Почему скрипт спамит, когда нет текста про AFK, или каждые 1-2 секунды пишет Y в чат? Или, например, когда нажат пробел? Я понимаю, что скрипт пытается определить Y или пробел, а затем нажать их? Потому что написано, что когда вы что-то пишете, скрипт автоматически нажимает Y или пробел. Можно ли как-то это убрать или заставить скрипт воспринимать Y или пробел как зеленую кнопку для нажатия?

Вот что сказал один парень:

Нужно выровнять текст

чтобы случайный текст не смещался, когда появляется 2087

Но как это сделать?



Lua:
local state = false

function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('safk', function()
        state = not state
        if state then
            lua_thread.create(function()
                while state do
                    wait(1)
                    afk()
                end
            end)
            sampAddChatMessage('{D32A2A}[SARG AFK] IJUNGTAS - {FFFFFF}/safk', -1)
        else
            sampAddChatMessage('{D32A2A}[}SARG AFK] ISJUNGTAS - {FFFFFF}/safk', -1)
        end
    end)
    wait(-1)
end

function afk()
if not sampIsCursorActive() and sampTextdrawIsExists(2087) then
setVirtualKeyDown(89, true)
wait(1000)
setVirtualKeyDown(89, false)
setVirtualKeyDown(32, true)
wait(100)
setVirtualKeyDown(32, false)
end
end
 

Вложения

  • afk.lua
    607 байт · Просмотры: 2