Item Generator
In-game functional item creator, no server restarts. Multi-framework (QBCore/Qbox/ESX) and multi-inventory (qs/ox/qb). Resource: nx-itemgenerator.
Installation
Place the [nx-itemgenerator] folder (with its 3 resources) in resources/. In your config:
ensure [nx-itemgenerator]
ensure nx-itemgenerator-propeditorACEs in server.cfg:
add_ace group.admin nxig.admin allow
add_ace group.god nxig.admin allow
add_ace resource.nx-itemgenerator command allow # REQUIRED: Sync / Restart inventory buttonsDatabase: auto-installs on first boot. sql/install.sql available to import by hand.
(Optional) Fivemanage image upload via convar:
set nxig:fivemanageKey "YOUR_TOKEN" # use set, NOT setrThe package includes 3 resources: nx-itemgenerator (creator), nx-itemgenerator-props (props satellite) and nx-itemgenerator-propeditor (calibrator). ensure [nx-itemgenerator] boots all three.
Features
- Hot injection: the item is usable instantly, no restarts.
- Drag & drop image (cropped to 128px → Fivemanage URL or local PNG).
- Hand prop with a visual 3D calibrator; exact offset saved per item.
- Consumables (hunger/thirst/duration), animated objects, and placeable deployables.
- Custom-prop sync (auto-regenerates the .ytyp).
- Item manager: status, generated code, edit and delete.
Configuration
config.lua (open):
| Option | Description |
|---|---|
| Config.Locale | Language 'en' / 'es' |
| Config.DatabasePrefix | Table prefix (default nxic) |
| Config.Command / Config.OpenKey | Command (nxitem) and key (F10) |
| Config.AdminAces | ACEs with creator access |
| Config.ImagePaths / Config.InventoryWrite | Image paths per inventory |
| Config.ImageUpload | Fivemanage endpoint/key/limits |
| Config.Prop | Default hand, consume anims, duration |
| Config.Place | Placement text, render distance, pickup icon |
Commands & Exports
| Command / key | Description |
|---|---|
| F10 (nxig_open, rebindable) | Open/close the creator (silent if no permission) |
| /nxitem | Same, warns if permission is missing |
-- Server: scans stream/, regenerates .ytyp + manifest, returns { model, label }
exports['nx-itemgenerator']:scanProps()
-- Client: opens the calibration gizmo, blocks until ENTER/ESC, returns offset or nil
exports['nx-itemgenerator-propeditor']:StartCalibration(model, boneTag, dict, anim, rotOrder, prevOffset)Advanced: adding custom props
- Drop your
.ydr/.ytd(and.ytypif you have it) intonx-itemgenerator-props/stream/. - Open the creator → prop field → press Sync.
- The resource regenerates the
.ytypwith the correct name and restarts only the satellite. The prop is now available.
Integrations
- Multi-framework / multi-inventory via
shared/bridge.lua(open and commented for your fork). - Fivemanage (optional) to host images by URL.
Common errors
- "Access denied for command restart/ensure" → missing
add_ace resource.nx-itemgenerator command allowin server.cfg (restart the server). - The image doesn't show (name-based inventories) → press Restart inventory in the item detail.
- The prop won't load ("does not load") → leave the
.ydrinstream/and press Sync (generator .ytyp use a hashed name that won't spawn). - Sync regenerates nothing → prop sync uses GTAUtil (bundled) and requires a Windows server; on Linux generate the .ytyp by hand or with Wine.