function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("teleport", cmdTeleport)
while true do wait(0) end
end
function cmdTeleport()
local result, Wx, Wy, Wz = getTargetBlipCoordinates()
if result then
setCharCoordinates(PLAYER_PED, Wx, Wy, Wz)
removeWaypoint()
end
end