Надпись на экране на клавишу

wvrN

Участник
Автор темы
108
20
Версия SA-MP
  1. 0.3.7 (R1)
Cделайте мне скрипт который будет показывать в чат "aim on" - "aim off" на клавиши ALT+Z, пожалуйста.
 

Вложения

  • Screenshot.png
    Screenshot.png
    19.7 KB · Просмотры: 18
Решение
Lua:
require 'lib.moonloader'
local vk = require 'vkeys'
local enable = false

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while true do
        wait(0)
        if isKeyDown(vk.VK_MENU) and isKeyJustPressed(vk.VK_Z) then
            enable = not enable
            printStringNow(enable and "aim ~g~on" or "aim ~r~off", 5000)
        end
    end
end

ARMOR

kjor32 is legend
Модератор
4,854
6,156
Lua:
require 'lib.moonloader'
local vk = require 'vkeys'
local enable = false

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while true do
        wait(0)
        if isKeyDown(vk.VK_MENU) and isKeyJustPressed(vk.VK_Z) then
            enable = not enable
            printStringNow(enable and "aim ~g~on" or "aim ~r~off", 5000)
        end
    end
end
 
  • Нравится
Реакции: wvrN