Installation Guide

This guide will provide step-by-step instructions on how to install and set up the KQ_PLACEABLE_ITEMS script for FiveM.

Step 1:

After downloading the script, unzip the folder and place it in the resources directory on your FiveM server.

Step 2:

Open the config.lua file in the script folder and make sure that the correct framework is enabled.

When using ox-inventory, set Config.oxInventorySettings > enabled to true and disable other frameworks

If you're not using ox-inventory, make sure to disable Config.oxInventorySettings > enabled

Step 3:

<!> Only needed when using persistent items

Next, you need to import the kq_placeable_items.sql file into your database. This will create the tables required for the script to function properly. You can watch this video for instructions on how to import an SQL file into your database: https://www.youtube.com/watch?v=xBbqDLXrZGY.

Step 4:

After the config file has been set up, add the script to your server.cfg file. Make sure that it's added after your framework of choice, so that it loads and starts properly.

Step 5:

Configure the script to your likings. Add your own items and define the corresponding models.

Done

Enjoy the script


OX-Inventory integration

Now if you wish to add a "Place" option to the inventory itself, simply add the following to each item within your ox-inventory items (and weapons) lists

buttons = {{ label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end }},

Here's a full example:

    ["gold"] = {
        label = "Gold",
        weight = 1,
        stack = true,
        close = true,
        buttons = {{ label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end }},
    },

Last updated