Не могу добавить бинд

MARSx13

Участник
Автор темы
102
5
В одном скрипте уже имеется бинд, но я хочу в тот же скрипт вписать ещё +1 и нихера не получается (раньше уже делал такое, но всё к херам за время забыл)
Просто пример скиньте допустим на клавишу b /lock который бы уже работал в скрипте
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do wait(0)
if testCheat('i') and not sampIsDialogActive() and not sampIsChatInputActive() then
if sampTextdrawIsExists(802) then
sampSendClickTextdraw(802)
else
sampSendChat('/showchat')
end
end
end
end
 
Решение
Lua:
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if testCheat('i') and not sampIsDialogActive() and not sampIsChatInputActive() then
            if sampTextdrawIsExists(802) then
                sampSendClickTextdraw(802)
            else
                sampSendChat('/showchat')
            end
        end
        if testCheat('b') and not sampIsDialogActive() and not sampIsChatInputActive() then
            sampSendChat('/lock')
        end
    end
end

yung milonov

Известный
975
476
Lua:
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if testCheat('i') and not sampIsDialogActive() and not sampIsChatInputActive() then
            if sampTextdrawIsExists(802) then
                sampSendClickTextdraw(802)
            else
                sampSendChat('/showchat')
            end
        end
        if testCheat('b') and not sampIsDialogActive() and not sampIsChatInputActive() then
            sampSendChat('/lock')
        end
    end
end
 
  • Нравится
Реакции: MARSx13