Item Setup
Items Setup Guide
Detailed guide for adding nail trap items to your inventory system.
Overview
The GOD - Nail Trap System requires two items to be added to your inventory:
screw_nail - Single-use nail item
nailspackage - Package containing multiple nails (up to 20)
ox_inventory Setup
Step 1: Locate Items File
Navigate to your ox_inventory directory and open:
ox_inventory/data/items.luaStep 2: Add Items
Add the following items to your items.lua file:
['screw_nail'] = {
label = 'Nail',
weight = 5000,
stack = true,
close = true,
description = 'A specially crafted nail to do something haha..',
client = {
image = 'screw_nail.png',
export = 'J0-nailScript.useNail'
},
},
['nailspackage'] = {
label = 'Nails Package',
weight = 5000,
stack = true,
close = true,
description = 'A specially crafted nail to do something haha..',
client = {
image = 'nailspackage.png',
export = 'J0-nailScript.useNailPackage'
},
},Step 3: Add Item Images
Copy
screw_nail.pngfromJ0-nailScript/installme/directoryPlace it in:
ox_inventory/web/images/screw_nail.pngFor
nailspackage, you can use the same image or create a custom one:Place in:
ox_inventory/web/images/nailspackage.png
Step 4: Restart Resource
After adding items, restart your ox_inventory resource:
ox_inventory Item Properties Explained
label
'Nail' / 'Nails Package'
Display name in inventory
weight
5000
Item weight (adjust as needed)
stack
true
Items can stack in inventory
close
true
Closes inventory when used
description
Custom text
Item description tooltip
client.export
Function name
Client-side export to call
qb-inventory Setup
Step 1: Locate Items File
Navigate to your qb-inventory directory and open:
Step 2: Add Items
Add the following items to your items.lua file:
Step 3: Add Item Images
Copy
screw_nail.pngfromJ0-nailScript/installme/directoryPlace it in:
qb-inventory/html/images/screw_nail.pngFor
nailspackage, you can use the same image or create a custom one:Place in:
qb-inventory/html/images/nailspackage.png
Step 4: Restart Resource
After adding items, restart your qb-inventory resource:
qb-inventory Item Properties Explained
name
Item identifier
Must match the key
label
Display name
Name shown in inventory
weight
5000
Item weight (adjust as needed)
type
"item"
Item type classification
image
PNG filename
Image file name (without path)
unique
false
Item is not unique (can have multiple)
useable
true
Item can be used/consumed
shouldClose
true
Closes inventory when used
combinable
nil
No combination recipes
description
Custom text
Item description tooltip
ESX Inventory Setup
If you're using ESX with a custom inventory system, follow the instructions for your specific inventory.
For standard ESX, you may need to:
Add items to your database (if using database items)
Register useable items in your ESX configuration (see Installation Guide)
Item Customization
Changing Item Weight
Adjust the weight property to match your server's economy:
Changing Item Description
Customize the description to match your server's lore:
Changing Item Labels
Customize display names:
Custom Item Images
Create custom images (recommended size: 512x512px)
Save as PNG format
Place in appropriate inventory images directory
Update
imageproperty in item configuration
Verification
After adding items:
Restart Inventory Resource
Check Items in Game
Open inventory
Verify items appear with correct names
Check images display correctly
Verify item descriptions show
Test Item Usage
Use
screw_nail- should place a nailUse
nailspackage- should allow placing multiple nailsVerify items are consumed when used
Check Console
No errors when using items
No missing export errors
No image loading errors
Common Issues
Items Don't Appear
Solution:
Verify item names match exactly (case-sensitive)
Check file syntax (commas, brackets)
Restart inventory resource
Clear server cache if needed
Images Don't Load
Solution:
Verify image files are in correct directory
Check file names match exactly (case-sensitive)
Ensure images are PNG format
Clear browser cache (for web-based inventories)
Items Don't Work When Used
Solution:
Verify
J0-nailScriptresource is runningCheck
shared/config.luafor correct inventory systemVerify exports are available (ox_inventory)
Check server console for errors
ox_inventory Export Not Found
Solution:
Verify
exportproperty is correct:'J0-nailScript.useNail'Check
J0-nailScriptresource is startedVerify client exports are registered
Check for typos in export names
Item Distribution
Giving Items to Players
ox_inventory:
qb-inventory:
Adding to Shops
Add items to your shop configuration files to allow players to purchase nails.
Adding to Crafting
You can create crafting recipes to allow players to craft nails from materials.
Best Practices
Consistent Naming: Keep item names consistent across all configurations
Proper Images: Use high-quality images for better user experience
Balanced Weight: Set appropriate weight values for game balance
Clear Descriptions: Write descriptive item descriptions for players
Test Thoroughly: Always test items after adding them
Items setup complete! Your inventory is ready for the Nail Trap System. 📦
Last updated