RegisterCommand('p', function(source, args)
local location = tonumber(args[1])
if not location or not locations[location] then
TriggerClientEvent("QBCore:Notify", '請輸入正確的地點編號.',"success")
return
end
local coords = locations[location]
if #coords > 1 then
TriggerClientEvent("QBCore:Notify","此坐標分為" .. #coords .. "個,請查看周圍.","error")
end
SetNewWaypoint(coords[1].x, coords[1].y)
TriggerClientEvent("QBCore:Notify", "已經將導航設置到地點.".. location .. ".","success")
end)