require "lib.moonloader"
local keys = require 'vkeys'
local sampev = require 'lib.samp.events'
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(300) end
while true do wait(0)
if isKeyJustPressed(0x4C) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampSendChat("/lock")
end
if isKeyJustPressed(0x04) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampSendChat("/gveh")
end
if isKeyJustPressed(0x06) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampSendChat("/callcar a000me")
end
if isKeyJustPressed(0x91) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampProcessChatInput("/sc")
end
if isKeyJustPressed(0x49) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampSendChat('/inv')
end
if isKeyJustPressed(0x05) and not sampIsChatInputActive() and not sampIsDialogActive() then
sampSendChat("/hveh")
end
end
end
function sampev.onShowDialog(id, stytle, title, btn1, btn2, text)
-----------------------------------------------------------
if id == 7547 then
sampSendDialogResponse(id, 1, 0, '')
return false
end
if id == 45 and text:find("Ваш автомобиль.* ") then
sampSendDialogResponse(id, 1, 0, '')
return false
end
if id == 45 and text:find("Ваш мотоцикл.* ") then
sampSendDialogResponse(id, 1, 0, '')
return false
end
----------------------------------------------
end