local hook = require('lib.samp.events')
local teleport, nop = false, false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('rctp', function()
local blip, bx, by, bz = getMark()
sampSendDialogResponse(id, button, listitem, input)
if id == 26211 and button == 1 then
if blip then
lua_thread.create(function()
teleport = true
wait(1000)
nop = true
setCharCoordinates(PLAYER_PED, bx, by, bz)
clearCharTasksImmediately(PLAYER_PED)
wait(500)
nop = false
wait(1000)
clearCharTasksImmediately(PLAYER_PED)
teleport = false
end)
end
end
end)
wait(-1)
end