Multicharacter
Starting Items
config/startingitems.lua - starter basket with a budget for items and vehicles.
On this page3 sections
When creating a character, the player gets a budget and picks what to take on the start.
Config.StartingItems = { enabled = true, budget = 6500, allowEmpty = true, items = { { key = 'sandwich', item = 'sandwich', label = 'Sandwich', price = 500, max = 5, default = 3 }, { key = 'water', item = 'water', label = 'Water', price = 250, max = 5, default = 3 }, { key = 'phone', item = 'phone', label = 'Phone', price = 1500, max = 1, default = 0 }, { key = 'energy', item = 'energy_drink', label = 'Energy drink', price = 750, max = 3, default = 0 }, { key = 'car', item = 'blista', label = 'Small car', price = 2000, max = 1, default = 1, kind = 'vehicle', image = 'nui://ox_inventory/web/images/blista.png' }, { key = 'bike', item = 'bmx', label = 'Bicycle', price = 800, max = 1, default = 0, kind = 'vehicle', image = 'nui://ox_inventory/web/images/bmx.png' }, }, itemImages = 'auto', grant = 'auto',}Main options
| Option | Description |
|---|---|
enabled | Shows the screen when creating a character. |
budget | Amount to spend. Unspent money is lost. |
allowEmpty | Lets the player continue without picking anything. |
itemImages | Image source: 'auto', 'ox_inventory', 'qb_inventory', 'qs_inventory', or false. |
grant | Inventory that receives the items: 'auto', 'ox_inventory', 'qb_inventory', 'qs_inventory', 'esx', or false. With false, the choice is saved and granting is left to your hook. |
Item fields
| Field | Description |
|---|---|
key | Unique key. |
item | Inventory item name. For a vehicle, the spawn name. |
label | Name on the card. |
price | Price per unit. |
max | Maximum units. 1 means yes or no. |
default | Units in the basket at start. |
kind | Leave out for normal items. 'vehicle' does not go to the inventory, only to the hook. |
image | Optional custom image, a path in web/dist/ or nui://. Without it, the inventory image is used. |
How it works
- The player picks items. The server checks the budget, limits, and keys.
OnStartingItemsPickedruns. It is informational only, the character has no inventory yet.- When the character is selected and its inventory exists, normal items are granted.
OnStartingItemsGrantedruns with the full list. Add vehicles to your garage here.
The basket is used once. A relog does not grant the same items again.