# v1.0.2

We've just pushed a new update introducing external integration hooks, inventory-agnostic weapon handling, and several stability fixes across jobs and UI.

## Changes

### New Integration Hooks (External Resources)

* `Config.OnClientVehicleSpawned(entity, model, netId)` — client hook fired after every job vehicle spawn (anticheat whitelisting, fuel, keys, etc.)
* `Config.OnServerVehicleSpawned(entity, owner, modelHash, plate)` — server hook for anticheat / statebag / tracker integrations
* `Config.RequiredXPFormula` — formula-based XP requirements replace the table when defined
* `Config.RewardMultiplierResolver(source, identifier, jobId, baseAmount)` — per-player reward multiplier hook (e.g. global XP bonuses)
* New event `tw-litejobpack:xpGained` — fires after any XP award with source/identifier/jobId/amount/level/leveledUp
* New exports: `AddGlobalXP`, `GetJobPlayerCount`, `GetAllJobPlayerCounts`
* New external pay-multiplier API with TTL: `SetJobPayMultiplier`, `GetJobPayMultiplier`, `ClearJobPayMultiplier`, `GetAllJobPayMultipliers`

### Inventory-Agnostic Helpers

* New `GetItemCount(src, item)` — works across ox, qs, codem, tgiann, ps, core, origen, qb, esx
* New `IsItemBasedWeaponInventory()` helper used by weapon-based jobs
* Fixed `addItem` signatures for ox\_inventory (passes info metadata), core\_inventory, and origen\_inventory
* Extended `removeItem` with explicit paths for ps-inventory, core\_inventory, origen\_inventory

### Hunting

* Full server-side weapon handling for ox/core inventories (weapon + ammo items, replenish loop, cleanup on reset/end/resource-stop)
* Friendly-fire protection now blocks firing at vehicles
* Fixed `onContinue`: properly cleans up animals/blips and re-selects the previous area
* `core_inventory` detection added alongside ox\_inventory

### Newspaper

* Added `onContinue` flow + server `server:newspaper:continueJob` — automatically picks the next eligible route (level/daily check) without restarting the job
* Added `core_inventory` support for item-based weapon delivery
* Removed `noContinue` flag on finish modal

### Cleanup

* Truck deposit switched from SphereZone to EntityTarget (proper TargetSystem integration)
* Fixed truck delivery gate: only triggers when truck is full (>= maxCapacity), previously fired as soon as any bag was loaded
* TargetSystem-aware notifications (new `hintCollectBinsTarget`, `bagPickedUpTarget`, `areaSelectedTarget` locale keys)
* Added `onContinue` with state/vehicle/area preservation

### Dogwalking

* Unified catch-interaction for both TargetSystem and default input (removes duplicate paths)
* Reset runaway state on dog claim
* Added `onContinue` with full entity cleanup (dog, managed dogs, leashes, poop, owner ped, ropes) and carry-over for bicycle/tool/payment

### Diving

* Fixed `pcall` swallowing animation/progress errors — split anim/progress from post-processing
* `ActionProgress` now forwards extra options (e.g. `allowSwimming`) to ox\_lib progress bar
* `RequireSelectedJob` enforced on sell menu

### Fishing

* `RequireSelectedJob` enforced on both shop and sell menus

### Forklift

* Added `onContinue`: cleans crates/belt/shelf/carry entities while preserving forklift ownership & totals
* Localized "Deliver crates to belt ({current}/{total})" progress label

### Warehouse

* Added `onContinue`: deletes boxes/pallets/coop entities, preserves forklift/truck progress counters

### Clothes Cabin

* Fixed `NetworkGetNetworkIdFromEntity` warning spam for local (non-networked) cabin entities via `NetworkGetEntityIsNetworked` guards
* Fixed freeze/reposition race after clothes restore (qb-clothing/illenium skin reload can teleport or re-freeze the ped)
* Re-fetch ped handle after external skin reload and reposition at cabin stop point before walking out

### Tool Component

* Replaced all hard-coded English error strings with localized keys (`notify.toolActionInProgress`, `toolCooldownActive`, `cannotTakeToolInVehicle`, `alreadyHoldingTool`, `noToolInTrunk`, `toolNotAssigned`, `toolNotYours`, `toolNotInTrunk`, `toolActionCancelled`, `toolAttachFailed`, `noJobCallbacks`, `serverDeniedTool`, `noToolInHand`, `noToolOnBelt`, `toolEntityNotFound`, `noActiveTool`, `noToolToReturn`) — added to all 8 languages

### Powerwash

* Lazy TargetSystem scope creation (removed eager init on start)

### Collectables

* New `SafeDeleteEntity` helper — waits for network control, disables collision/freeze/visibility as fallback → prevents orphaned ghost vehicles

### Truck Driver

* Track attached pallet/box netIds; server-side cleanup on truck despawn prevents orphaned floating props when the truck despawns far from players (`FindFirstObject` iterator was client-local only)
* New export `RegisterTruckAttachedEntity`

### UI / DrawText

* Flicker-safe DrawText: SHOW calls are payload-deduplicated (no NUI spam on Wait(0) loops); HIDE is deferred 120ms with a sequence token so rapid re-shows cancel the pending hide (absorbs frame-boundary oscillation at distance thresholds)

### Job Center Carousel (HTML)

* Fixed background video loading issues under rapid carousel scrolling: removed listener accumulation, removed redundant double-load (Vue `:src` auto-load was fighting manual `vid.load()`), silent handling of expected abort/error events on src change — no more log spam and stale "blank video" state

## Changed Files

`All files`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tworst.com/getting-started-installation/scripts/lite-jobs-pack/changelog/v1.0.2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
