Waypoint


Sets a waypoint on the map for the player

---@param data table
RegisterNetEvent('drx_mdt:client:setWaypoint', function(data)
  if type(data) ~= 'table' or type(data.x) ~= 'number' or type(data.y) ~= 'number' then
    prints.error('Invalid waypoint data received')
    return
  end

  if IsWaypointActive() then
    DeleteWaypoint()
  end

  SetNewWaypoint(data.x, data.y)
end)

Last updated

Was this helpful?