😡
RAINMAD Documentation
WebsiteStoreDiscordYouTube
  • Welcome to RAINMAD Scripts
  • INFORMATION
    • FAQ
    • Support and Assistance
    • Discord Roles
    • How to Update Your Asset
  • CFX Auth system
    • FiveM Asset Escrow System
  • Development Guide
    • Common Issues
    • How to Add Webhooks
    • Target Options Configuration
    • How to Translate Your Script
    • How to Integrate Your Custom Notification Script
    • How to Change the Black Money Name
    • How to Add an Item
    • How to Change the Dispatch
    • Framework Selection and Configuration
    • Finding Item Images
  • RESOURCES
    • Cargo Ship Heist
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Configuration
      • Exports
    • Below the Vault Heist
      • Installation
    • NPC Mechanic
      • Installation
      • Configuration Guide
    • Cash Exchange Heist
      • Installation
      • Dependencies
    • Drugs V: Grow, Cook & Space!
      • Installation
      • Configuration Guide
    • Drugs V: Laboratories
      • Installation
      • Configuration Guide
    • Drugs V: Goods Deal
      • Installation
      • Configuration Guide
    • Drugs V: Business Labs
      • Installation
      • Configuration Guide
    • Drugs V: Effects
      • Installation
      • Configuration Guide
      • Exports
    • Drugs V: Money Laundering
      • Installation
      • Configuration Guide
    • Bank Truck Robbery - 4 in 1!
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Events & Exports
      • Disable Mission NPC
    • House Robbery with Welding Minigame
      • Installation
      • Dependencies
      • Inventory Integration
      • Translate Strings
      • Discord Log
      • Creating a House for Robbery
      • Events & Exports
      • Disable Mission NPC
    • Lootbag
      • Installation
    • Bounty Board
      • Installation
    • Chopshop with Welding Minigame
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Events & Exports
      • Disable Mission NPC
    • Scenes: Draw everywhere
      • Installation
      • Add Text Font
      • Events & Exports
    • Vault Heist
      • Installation
      • Vehicle Mods
      • Dependencies
    • Barge Heist
      • Installation
      • Dependencies
    • Towtruck + Missions
      • Installation
    • Zombies & Dungeon
      • Installation
      • Rarity System
    • Gangs - Territory, Wars & Tribute Zones!
      • Installation
      • Add Gang & Tribute Zone
      • Events & Exports
      • Gang System for ESX
    • Camper V: Drug Caravans
      • Installation
      • Dependencies
    • Realistic Airdrop
      • Installation
    • ATM Robbery - 4 in 1!
      • Installation
    • Bobcat Security Heist
      • Installation
      • Dependencies
    • Minigame Bundle
      • Installation
      • Minigame Exports
      • Translate Strings
    • Weapon V: Realism
      • Installation
    • Boombox with Watch Party
      • Installation
      • Youtube API Key
      • Exports
    • Drop and Dead Info.
      • Installation
    • Throw Everything
      • Installation
      • Useable Items
      • Exports
      • QBCore Compatibility
      • ESX Compatibility
    • Police Riot with Interior
      • Installation
      • Dependencies
    • Dialog with NPC
      • Installation
    • Gun Store Heist
      • Installation
      • Dependencies
    • Emoji V: Share Feelings
      • Installation
    • Illegal Corners: Selling Goods
      • Installation
      • Adding a New Corner
    • Decal V: Graffiti & Vehicle Sticker
      • Installation
      • Custom Decal
      • Events & Exports
    • Hacker V: Become Hacker
      • Installation
      • Custom Hack
      • Functions & Events
    • Weed Shop Heist
      • Installation
      • Dependencies
    • Jailbreak
      • Installation
      • Dependencies
    • Vangelico Heist Final
      • Installation
      • Dependencies
    • Pets
      • Installation
      • QBCore Compatible
    • Artifact Heist
      • Installation
    • Betta Heist
      • Installation
    • Oil Rig Heist
      • Installation
      • Dependencies
    • Fleeca Heist Final
      • Installation
      • Dependencies
    • Deluxe Car Heist
      • Installation
    • Yacht Heist
      • Installation
    • Paleto Heist
      • Installation
    • Union Heist
      • Installation
    • Shop Robbery
      • Installation
    • Drug Boat Heist
      • Installation
    • Underground Heist
      • Installation
      • Dependencies
    • Van Heist
      • Installation
      • Dependencies
    • Pacific Heist
      • Installation
      • Dependencies
    • Train Heist
      • Installation
    • Humane Labs Heist
      • Installation
    • Vangelico Heist
      • Installation
    • Fleeca Heist
      • Installation
    • Casino Heist
      • Installation
      • Dependencies
      • Compatible For Rcore
    • Art Heist
      • Installation
      • Dependencies
    • Kidnapping
      • Installation
    • Graffiti War
      • Installation
Powered by GitBook
On this page
  • For qb-core and qb-inventory
  • For ox_inventory
  • For esx inventory
  • For qs_inventory
  • Verifying Your Changes
  • Troubleshooting
  • Additional Tips
  1. Development Guide

How to Add an Item

To add a new item to your FiveM server, you need to modify specific files based on the inventory system you’re using. These files are located in the [items] directory within your script. Follow the instructions below based on your inventory system.

For qb-core and qb-inventory

If you’re using qb-core and qb-inventory, you need to edit the qb-core/shared/items.lua file.

Steps to Modify:

  • Locate the [items] Directory:

    • Connect to your server files via FTP or file manager.

    • Navigate to the qb-core resource directory and find the qb-core/shared/items.lua.

  • Open shared.lua:

    • Use a text editor to open the shared.lua file within the [items] folder.

  • Add Your Item:

    • Find the section where items are defined. Add your new item details to the existing item table.

  • Save and Restart:

    • Save the items.lua file and restart your server.

For ox_inventory

If you’re using ox_inventory, you need to modify the ox_inventory/data/items.lua file.

Steps to Modify:

  • Locate the [items] Directory:

    • Connect to your server files via FTP or file manager.

    • Navigate to the ox_inventory resource directory and find the ox_inventory/data/items.lua.

  • Open items - ox_inventory.lua:

    • Use a text editor to open the items - ox_inventory.lua file.

  • Add Your Item:

    • Find the section where items are defined and use the appropriate method to register your new item.

  • Save and Restart:

    • Save the items.lua file and restart your server.

For esx inventory

If you’re using esx inventory, you’ll need to update the items table in your database.

Steps to Modify:

  • Locate the [items] Directory:

    • Connect to your server’s database management tool (e.g., phpMyAdmin) and find the items.sql file.

  • Open and Edit items.sql:

    • Open the items.sql file and add your new item details to the appropriate table, usually items.

  • Apply Changes:

    • Execute the SQL query to add the item to your database.

  • Restart Your Server:

    • Restart your server to ensure the new item is available.

For qs_inventory

If you’re using qs_inventory, you need to edit the shared.lua file located in the [items] folder.

Steps to Modify:

  • Locate the [items] Directory:

    • Connect to your server files via FTP or file manager.

    • Navigate to the qs_inventory resource directory and find the qs_inventory/shared/items.lua.

  • Open shared.lua:

    • Use a text editor to open the shared.lua file within the [items] folder.

  • Add Your Item:

    • Find the section where items are defined and add your new item details.

  • Save and Restart:

    • Save the items.lua file and restart your server.

Verifying Your Changes

  • Test the New Item:

    • Verify in-game that the new item appears and functions as expected.

  • Check Inventory System:

    • Ensure the item is properly integrated into your inventory system and is visible in the correct sections.

Troubleshooting

  • Item Not Showing Up: Check for syntax errors and confirm that the server has been restarted.

  • Errors in Console: Review server logs for any error messages related to item addition.

Additional Tips

  • Backup Files: Always backup the original files before making changes.

  • Consult Documentation: Refer to the documentation for your specific inventory system for additional guidance and best practices.

PreviousHow to Change the Black Money NameNextHow to Change the Dispatch

Last updated 8 months ago