require 'lib.moonloader'
local sampev = require 'lib.samp.events'
function main()
while not isSampAvailable() do wait(50) end
while true do
if isKeyDown(0x12) and isKeyJustPressed(0x32) and not isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
sampSendChat('/delta')
end
wait(0)
end
end
function sampev.onShowTextDraw(id, data)
lua_thread.create(function()
if data.text == 'your progress' and not isCharInAnyCar(PLAYER_PED) and not sampIsCursorActive() then
repeat
setGameKeyState(9, 255)
setGameKeyState(16, 255)
setGameKeyState(21, 255)
wait(0)
setGameKeyState(9, 0)
wait(0)
setGameKeyState(16, 0)
wait(0)
setGameKeyState(21, 255)
if sampIsDialogActive() then
sampCloseCurrentDialogWithButton(0)
return false
end
until isCharInAnyCar(1)
end
end)
end