Биндер на lua

atomspace

Новичок
Автор темы
11
0
Код:
require ("lib.moonloader")
function main ()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
  while not isSampAvailable() do wait(100) end
  while true do
    wait(0)
    if wasKeyPressed(VK_Z) then
        local enabled = sampIsChatInputActive()
        local chat = sampSendChat("/anim 3")
        if enabled then
            chat = false
        elseif not enabled then
            chat = true
        end
    end
end
 

traceattack

Известный
218
118
Код:
require ("lib.moonloader")
function main ()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
  while not isSampAvailable() do wait(100) end
  while true do
    wait(0)
    if wasKeyPressed(VK_Z) then
        local enabled = sampIsChatInputActive()
        local chat = sampSendChat("/anim 3")
        if enabled then
            chat = false
        elseif not enabled then
            chat = true
        end
    end
end
Типичный пример заказчика и его ТЗ :confused: