Custom PED System
A private NPC vendor system for FiveM. Spawn custom peds at any location and lock them to specific players by identifier — only the people you whitelist can open their shop. Each vendor gets its own item list, ped model, and coordinates, all configured in a single file.
Compatibility
Features
- Spawn any number of vendor peds, each at their own coordinates and heading
- Lock each vendor to a single player or a list of players by identifier/citizenid
- Custom NUI shop — tabbed categories, search bar, sort controls, quantity picker
- Item images pulled automatically from ox_inventory
- Per-item quantity selector with +/− buttons and direct number input
- Purchase result toasts shown directly in the shop UI
- Server-side payment and item delivery — no client-side exploit surface
- Peds are invincible, frozen, and clean up on resource stop
- ESC key or × button closes the shop and releases NUI focus
How it works
Each entry in Config.Vendors defines one vendor ped. When the server starts, peds are spawned at their configured coordinates with ox_target interaction zones. When an allowed player interacts, the NUI shop opens with that vendor's item list. Purchases are sent to the server, which checks the player's cash balance, deducts the amount, and adds the item to their inventory.
The identifier check happens client-side before the shop opens — if the player isn't in the vendor's allowed list, they see a notification and the shop never opens.
Dependencies
| Resource | Required | Notes |
|---|---|---|
| ox_target | required | Interaction prompt on vendor peds |
| ox_inventory | required | Item images served from nui://ox_inventory/web/images/ |
| ox_lib | required | Listed as dependency in fxmanifest |
| es_extended / qb-core | one of | Set via Config.Framework |