KuzQuality - FiveM Documentation
Webstore
  • KuzQuality - FiveM Scripts
  • Useful links
    • KuzQuality.com | Shop now
    • Our Discord
  • General
    • Common issues
    • Frequently asked questions
    • Updating server artifacts
    • Installation basics
  • RESOURCES
    • Premium Resources
      • Shell Creator
        • Config
        • Installation Guide
        • Video guide
        • API
          • Server
          • Client
      • Cocaine Production
        • Config
        • Installation Guide
      • Roof boxes & bike racks
        • Config
        • Installation Guide
        • API
      • Meth Cooking
        • Config
        • Installation Guide
      • Private islands
        • Config
        • Installation Guide
      • Real offroad physics
        • Config
        • Installation Guide
        • API
      • Placeable items
        • Config
        • Inventory integrations
        • Installation Guide
      • Car Dyno
        • Config
        • Installation Guide
      • Outfit Bag 2.0
        • Config
        • Installation Guide
      • Realistic wheel damage
        • Config
      • Smash 'n Grab 2.0
        • Config
        • Installation Guide
      • Animation Suggestions
        • Config
        • Installation Guide
      • Smugglers Heist
        • Config
        • Installation Guide
      • Car Heist
        • Config
      • Towing & Winching
        • Config
        • Installation Guide
      • Security Systems
        • Config
        • Developer Docs
      • Drift Tires
        • Config
        • Installation Guide
      • Engine Swaps [ESX]
        • Config
      • Engine Swaps [QBCore]
        • Config
      • Islands Generator
        • Config
        • Installation Guide
      • Brake Overheating
        • Config
        • Installation Guide
      • Drift Smoke
        • Config
      • Advanced Ped Looting
        • Config
        • Installation Guide
      • Bike Jump Ability
        • Config
        • Installation Guide
      • Hideouts 2.0
        • Config
      • Detective Tools
        • Config
      • Classic Outfit Bag
        • Config
      • Traction Control Toggle
        • Config
      • Car Lift
        • Config
      • Vehicle Towing
        • Config
      • RGB Controller (Full)
        • Config
      • Diving [ESX]
        • Config
      • Diving [QBCore]
        • Config
    • Free Resources
      • Prop Placer
        • Config
      • Nightclub Heist
        • Config
      • Basic Security Lasers
        • Config
        • Developer Docs
      • Advanced Airdrop
        • Config
      • Smooth Throttle Control
        • Config
      • Better rollbacks & handbrake turns
        • Config
      • Wild Cannabis (Loot Areas Example)
        • Config
      • RGB Controller (Basic)
        • Config
      • Dragy
        • Config
      • Easter Egg Hunt
        • Config
      • Loot Areas
        • Config
        • Developer docs
  • KQ Link
    • KQ Link | Installation guide
    • Using Git
    • Developer reference
      • Exports
        • Server
        • Client
Powered by GitBook
On this page
  • Step 1:
  • Step 2:
  • Step 3:
  • Step 4:
  • Step 5:
  • Done
  • OX-Inventory integration
  1. RESOURCES
  2. Premium Resources
  3. Placeable items

Installation Guide

PreviousInventory integrationsNextCar Dyno

Last updated 6 months ago

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: .

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 }},
    },

This could also be automated. This will requrie a little modification to the items.lua file

At the top of the file, replace the instant return of the items table with:

local items = {

Then at the very bottom of the file add the following code

for k, item in pairs(items) do
    if not item.buttons then
        item.buttons = {{ label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end }}
    else
        table.insert(item.buttons, { label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end })
    end
end

return items

The resulting file should look something like this:

local items = {

    ['bandage'] = {
        label = 'Bandage',
        weight = 115,
        client = {
            anim = { dict = 'missheistdockssetup1clipboard@idle_a', clip = 'idle_a', flag = 49 },
            prop = { model = `prop_rolled_sock_02`, pos = vec3(-0.14, -0.14, -0.08), rot = vec3(-50.0, -50.0, 0.0) },
            disable = { move = true, car = true, combat = true },
            usetime = 2500,
        }
    },

    ['black_money'] = {
        label = 'Dirty Money',
    },

    ['burger'] = {
        label = 'Burger',
        weight = 220,
        client = {
            status = { hunger = 200000 },
            anim = 'eating',
            prop = 'burger',
            usetime = 2500,
            notification = 'You ate a delicious burger'
        },
    },
}

for k, item in pairs(items) do
    if not item.buttons then
        item.buttons = {{ label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end }}
    else
        table.insert(item.buttons, { label = 'Place', action = function(slot) exports['kq_placeable_items']:placeItem(slot) end })
    end
end

return items

https://www.youtube.com/watch?v=xBbqDLXrZGY