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