Сбив таймом как у гангстера

dozzys

Новичок
Автор темы
10
0
Версия SA-MP
  1. Любая
Можете дать сбив таймом как у гангстера. Буду благодарен
 

g305noobo

Известный
Модератор
323
559
По умолчанию включен, активация на кнопку R | Вкл/выкл /timesbiv.

Чтобы изменить кнопку активации поменяй значение в скобках на нужную тебе клавишу - isKeyJustPressed(vkeys.VK_R).
Список клавиш: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

TimeSbiv:
local vkeys = require "vkeys"
local act = true
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand("timesbiv", function()
        act = not act
        sampAddChatMessage('сбив через /time ' .. (act and 'включен' or 'выключен'), -1)
    end)
    while true do
    wait(0)
        if act and isKeyJustPressed(vkeys.VK_R) and not sampIsDialogActive() and not sampIsChatInputActive() then
            sampSendChat('/time')
            sampSendChat('                        ')
        end
    end 
end
 

Вложения

  • TimeSbiv.lua
    555 байт · Просмотры: 15
Последнее редактирование:
  • Нравится
Реакции: dozzys

dozzys

Новичок
Автор темы
10
0
По умолчанию включен, активация на кнопку R | Вкл/выкл /timesbiv.

Чтобы изменить кнопку активации поменяй значение в скобках на нужную тебе клавишу - isKeyJustPressed(vkeys.VK_R).
Список клавиш: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

TimeSbiv:
local vkeys = require "vkeys"
local act = true
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand("timesbiv", function()
        act = not act
        sampAddChatMessage('сбив через /time ' .. (act and 'включен' or 'выключен'), -1)
    end)
    while true do
    wait(0)
        if act and isKeyJustPressed(vkeys.VK_5) and not sampIsDialogActive() and not sampIsChatInputActive() then
            sampSendChat('/time')
            sampSendChat('                        ')
        end
    end 
end
чо делать не робит?