How To Add New Items To A Fivem Server
Welcome to our guide on adding new food & drink items to your Fivem roleplay server. In this guide we will cover what programs you will need and the quickest and easiest way to add new items to your Fivem Server.
Recommended Programs
Heidi SQL (Click Here To Visit Developers Website)
We always recommend using Heidi SQL for managing your Fivem database, trying to manage your Fivem database with PHPmyadmin is like trying to cross an ocean whilst sat inside a wheelie bin filled with bee’s, you get the idea…
STEP 1:
Open up Heidi SQL and then go to your ‘ITEMS’ table within your database.
STEP 2:
To create a new item, click the green plus icon as shown below
STEP 3:
You will want to create an image and add it to your inventory system. When doing this there are a few things you must ensure you do, otherwise it could lead to mistakes.
Image Size: Always make sure your new items have the same size image. You can copy an existing image, replace it in photoshop and then rename it to be safe
Always add the name of the new image to the fxmanifest or resource.lua within your Inventory script.. You can use /* which will automatically find new images
Use PNG images or edit the image to ensure it has no background.. otherwise this background will display in your Fivem server and will not look clean when players open there inventory
Images are normally within a ‘HTML’ folder within an inventory or script
STEP 4:
Now you want to find your ‘basicneeds’ script and then open the ‘server’ folder and then open the main.lua inside. Here you will see the list of functions being used for each item in your server. You can edit anything to your liking, for example when people eat salty food it could make them more thirsty.