Помогите с чекером чата.

Unae

Активный
Автор темы
124
30
Помогите сделать проверку на чат, что-бы биндер при включении чата (f6) не реагировал на забиндованные клавиши, и не выполняли функцию.
Я нашёл что-то 'sampIsChatVisible', но не знаю как её оформить :(

test:
local vkeys = require 'vkeys'

local color_s = '0xFFFFFF'

function main()
    if not isSampAvailable() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand('gas', gas)
    sampAddChatMessage('Все запущено', color_s)


    while true do
        wait(0)
        if isKeyJustPressed(0x72) then
            sampSendChat('/mn')
        end
        if isKeyJustPressed(0x47) then
            sampSendChat('/stats')
        end
        if isKeyJustPressed(0x48) then
            sampSendChat('/armour')
        end
    end
end

function gas()
    sampSendChat('/members')
end
 
Решение

talberom

Известный
108
15
 
  • Нравится
Реакции: Unae