How To Add New Items To A Fivem Server

fivemfoodanddrink.jpg

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.

 
  1. 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…

This image shows the ‘ITEMS’ table within our Fivem ESX Server. Here you can see some of our items we have created for the world. If you have downloaded a script which has an SQL file, you will need to import the SQL into Heidi or manually add the items.

This image shows the ‘ITEMS’ table within our Fivem ESX Server. Here you can see some of our items we have created for the world. If you have downloaded a script which has an SQL file, you will need to import the SQL into Heidi or manually add the items.

 
 

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

Then add the name of your new items, for example ‘cheeseburger’  make sure you DO NOT use capital letters in the ‘name’ column and only use capital letters in the ‘label’ column

Then add the name of your new items, for example ‘cheeseburger’ make sure you DO NOT use capital letters in the ‘name’ column and only use capital letters in the ‘label’ column

 

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.

The highlighted text is the code used for ‘cheeseburger’ You can copy an entire function, paste it and then change the word of the item to match the new created item…  TIP: Always make a backup of the script before making edits

The highlighted text is the code used for ‘cheeseburger’ You can copy an entire function, paste it and then change the word of the item to match the new created item…

TIP: Always make a backup of the script before making edits

 

FINISHED! Restart Your Server And Spawn The Item To Test

Previous
Previous

FIVEM ESX FARM SCRIPT

Next
Next

How To Add A Server Logo