Skip to content

np_* integrations ​

Every sibling is optional. Adapters attach only while GetResourceState(name) == 'started'; export calls are protected and missing exports fail safely. The logistics board remains available without any sibling. np_addon registrations attach again after host restarts.

Wired APIs and current limits ​

Resource Verified API and behavior
np_jobs Registers the feature pack, table-form features, loadout/vehicle/item providers, $1 logistics.leg pay task, and addHook('beforeDutyOff', fn). This follows np_jobs/docs/IDEAS.md §12 and np_medic/docs/IDEAS.md §4. The adapter exposes payTask(src, name, units, ctx); the current contract settlement path uses the durable logistics payout service.
np_minijobs registerContractType, postContract, and completeContract per np_minijobs/docs/API.md. Lightweight NPC parcel/van contracts are posted in external mode and lifecycle callbacks sync with logistics. The internal logistics board is the fallback.
np_phone Uses server exports notify, groupGetByPlayer, groupStartJob, groupSetStage, groupSetProgress, and groupFinishJob. Phone notifications and optional group progress are wired. There is no registerJobCenterEntry, registerGroupJob, or custom-app UI in this checkout; see Compatibility.
np_faction Registers logistics_depot and logistics_scale through registerPlaceType; consumes np_faction:placeUsed; exposes safe GetAccount and Can helper calls. HasCertification, PayTask, and GetPlaces are available as documented but no current logistics path needs them.
np_banking Uses real exports CreateAccount, GetAccounts, GetPersonalAccount, Transfer, ListAccounts, GetAccount, and Credit as documented in np_banking/docs/API.md. Player escrow holds the selected account's funds in a dedicated personal account used as the escrow holding account.
np_payments LogisticsServer.invoice(target, amount, reason, opts) calls Invoice(target, opts). The helper supplies a default freight merchant. Positive fines automatically request an invoice when inspection identifies the driver of an occupied freight vehicle and np_payments is available. Supply opts.payee to route collections to a configured city/legal payee; it is otherwise omitted. Ground/unoccupied cargo may have no identifiable driver, so the fine remains recorded without automatic invoicing.
np_npchandler LogisticsServer.registerDockNpc(id, def) forwards namespaced definitions to registerNpc. Gameplay must supply valid NPC definitions and interaction events.
np_mechanic Reads GetVehicle(plate) condition data, records via AddServiceEntry, and observes np_mechanic:server:vehicleRepaired. Repair gameplay stays in np_mechanic.
np_minigames Exposes server-validated SkillCheck and Play helpers for seal cutting/lockpicking. Gameplay keeps its local fallback when absent.
np_hud LogisticsServer.hudNotify calls Notify(src, data). Client prompts and notifications belong to the gameplay client layer.
np_menu LogisticsServer.registerMenuAction calls the server registerAction export. This does not render client interactions; gameplay must register client radial/prompt behavior.
np_anticheat Exposes helpers over expectEntity, expectTeleport, and expectMoney for approved rig spawn, teleport, and payout actions. These are player-source receipts.
np_dispatch Source is not implemented in the sibling checkout; its IDEAS specifies publish(alert). Logistics calls it for inspections/holds, broken seals, and stolen cargo when present.
np_discord No stable public logging export was found. LogisticsServer.logIntegrationEvent is an internal optional extension point; no guessed Discord event is fired.
np_garages, np_vehiclekeys No implementation/API source in the checked-out siblings. Optional calls are exposed as registerFleetGarage, storeFleetVehicle, and giveVehicleKey; see exact exports below.
np_fuel Imports GetStations/GetOrders; tanker sink adds stock with AddStock(station,fuel,litres,'logistics'). Orders are a startup snapshot because current CreateOrder has no public order-created event.
np_fishing Imports addressed GetFishOrders entries with deliverTo and de-duplicates IDs. Delivery targets the online character inventory; item changes roll back unless CompleteFishOrder(id, contractId) closes the source order successfully. CreateFishOrder can already set deliverTo; unaddressed NPC orders stay in np_fishing.
np_farming np_farming:business sink adds lines to an np_inventory stash with rollback after partial failure. The current PostContract API has no haul handoff; see change request.
np_vending Registers a np_vending:machine sink that calls proposed RestockFromLogistics(machine,item,count,orderId). Observes np_vending:server:restocked only for audit because that event is emitted after mutation.
np_dealership Sink calls planned CompleteDelivery(jobId, report) and fails safely until implemented. Current sibling is docs/mockups only.
np_commerce Supports the current order(venueId, lines) compatibility shape, exports createCourierLeg(contract), and adapts a callback passed to registerSink('np_commerce', callback). Funded structured order(spec) is preferred.
np_inventory, ox_inventory Logistics stash/item operations; ox_inventory is the fallback. Install item definitions from item catalogue.
np_shops Registers places from GetShops; sink delivers through AddStock(shop,item,count).
np_housing Provides registerPremises, mailbox-provider registration, deliverToMailbox, and dropAtDoor exports consumed by np_housing-impl.
np_identification Checks driver licence classes and ADR docs for freight access.
np_prophandler, np_cctv / np_surveillance, np_admin, np_colshape Existing cargo prop, camera source, admin bridge and colshape adapters remain optional.

np_manufacturing, np_utilities, np_transport, np_legal, np_police, and np_crime have no current public API implementation for the requested freight handoff/inspection/hijack features. See the precise change requests in Compatibility.

Gameplay client helpers ​

The gameplay client layer should use a shared registry, check resource state, wrap exports with pcall, and retain a local fallback:

  • np_hud: client notification/prompt for pickup, delivery, inspection and failure.
  • np_menu: client radial actions for inspect, seal/cut, hitch/unhitch, dock and parcel prompts; server must revalidate.
  • np_phone: current server notifications and group progress are wired; there is no app/job catalog registration export.
  • np_minigames: send seal/lockpick attempts through server RPC and accept only server-validated results.
  • np_anticheat: call receipt helpers only around server-approved spawn, payout or teleport operations.

Implementation notes above reflect the checked-in adapters. Live FiveM verification remains outstanding.

Register a receiving resource ​

Vendor the np_addon bridge in your server resource and declare np_addon 'np_logistics' in its manifest. Register your own sink and places when the host attaches; repeated attach calls must not create duplicate orders.

lua
npAddon.attach('np_logistics', function()
  exports.np_logistics:registerSink('my_shop:stock', {
    deliver = function(order, contract)
      -- Apply order.spec.cargo atomically to your stock.
      -- Persist a unique order.id receipt in the same transaction.
      -- On retries, return true for an already applied receipt.
      return MyShop.applyFreight(order.id, order.spec.to, order.spec.cargo)
    end,
  })
  exports.np_logistics:registerPlace({
    id = 'my_shop:receiving', type = 'shop', label = 'Receiving',
    coords = { x = 24.5, y = -1346.2, z = 29.5 },
  })
end, { api = 1 })

MyShop.applyFreight is your receiving implementation, not a logistics export. The resource that posts an order must own its registered sink. Do not assume a built-in sink registered by logistics can be posted to by an unrelated resource.

lua
local orderId, reason = exports.np_logistics:order({
  sink = 'my_shop:stock',
  from = 'configured_depot', to = 'my_shop:receiving',
  kind = 'pallet', cargo = { { name = 'water', count = 20 } },
  budget = 0, -- unfunded example; configure payer/budget for funded work
  meta = { label = 'Shop restock' },
})

Register the origin place too, or use an existing stable place ID. Check every return value and report rejected orders to the calling workflow. Receiving callbacks own stock validation, capacity, deduplication and rollback; server-only events are lifecycle notifications, not permission to mint stock. Run funded orders against the actual payer/account setup in your server before enabling rewards.