function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('teleport',command)
while true do wait(0) end
end
function command()
bool,x,y,z = getTargetBlipCoordinates()
if bool then
setCharCoordinates(playerPed,x,y,z)
sampAddChatMessage('Teleport successfully loaded!',0xDF1DE2)
end
end