require 'lib.moonloader'
local vkeys = require "vkeys"
local sampev1 = require 'samp.events'
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(100)
if not sampIsDialogActive() and not sampIsChatInputActive() then
if isKeyJustPressed(VK_O) then
local posX, posY, posZ = getCharCoordinates(PLAYER_PED)
local posiZ = posZ - 1
setCharCoordinates(PLAYER_PED, posX, posY, posiZ)
wait(1000)
end
if isKeyDown(VK_R) then
sampSetSpecialAction(68)
else
sampSetSpecialAction(0)
end
end
end
end
function sampev1.onShowDialog(dialogId, style, title, button1, button2, text)
if dialogId == 109 then
sampSendDialogResponse(dialogId, 1, 0, '#Enrike')
thisScript():unload()
end
end