Install

These are the instructions for installing the Click To Use script

Step 1: Locate your [ks-ctu] folder

  1. Go to the resources folder in your FiveM server directory.

  2. Ensure the folder name is exactly [killstore] (including the square brackets).

  3. Locate the folder [ks-ctu] inside.

  4. If it is not there, please go back to the Welcome! page and make sure to have all your files together.

Step 2: Ensure the Script

  1. Open the server.cfg file located in your FiveM server's main directory.

  2. Add ensure Ks_Click_To_Use-Assets BEFORE your Framework:

ensure Ks_Click_To_Use-Assets
ensure Your_framework
  1. Add the following line AFTER your inventory system:

ensure Your_Inventory
ensure [killstore]

It should finally look like this

# ...
ensure Ks_Click_To_Use-Assets
ensure Your_framework
# ...
ensure Your_Inventory
ensure [killstore]

Now you need to restart the server.

Step 3: install the AUTO-ITEMS

Inside the [ks_ctu] folder, you will find an installation folder:

Ks_Click_To_Use-Assets/ICON:

  1. Copy the item icons from the images folder into your inventory’s image directory.

  2. Auto-Items

Installation of items is not necessary as they will be automatically installed with the following, please be careful depending on your frame/inventory combination

qb-core

If you are using QB-Core with:

  • Quasar Inventory (qs-Inventory)

  • Origen Inventory (origen_Inventory)

  • Ox Inventory (ox_Inventory)

or the items must be placed within QB-Core

  1. Select one of the following tabs depending on your inventory

  • go to the path qs-inventory\shared\items.lua

  • At the END of the code for your item list, put the following:

local killstoreItems = exports['Ks_Click_To_Use-Assets']:killstoreItems()

for itemName, itemData in pairs(killstoreItems) do
    QBShared.Items[itemName] = itemData
end

esx

If you are using ESX with:

  • Quasar Inventory (qs-Inventory)

  • Origen Inventory (origen_Inventory)

  • Ox Inventory (ox_Inventory)

or the items must be placed within YOUR INVENTORY

  1. Select one of the following tabs depending on your inventory

  1. go to the path qb-core\shared\items.lua

  2. At the END of the code for your item list, put the following:

local killstoreItems = exports['Ks_Click_To_Use-Assets']:killstoreItems()
for itemName, itemData in pairs(killstoreItems) do
    ItemList[itemName] = itemData
end

others

If you are using another framework or another inventory you can adapt it yourself, you should know that the export killstoreItems() contains the list of all the items of the click to use modules, and they are placed in a table

--@ killstoreItems -- table
local killstoreItems = exports['Ks_Click_To_Use']:killstoreItems()

print(json.encode(killstoreItems , {indent = true}))
-- killstoreItems result :

"millk-r": {
    "label": "Mochila Leche Roja",
    "name": "millk-r",
    "weight": 100,
    "image": "millk-r.png",
    "unique": false,
    "type": "item",
    "combinable": true,
    "shouldClose": false,
    "useable": true
},
"millk-be": {
        "label": "Mochila Leche Beige",
        "name": "millk-be",
        "weight": 100,
        "image": "millk-be.png",
        "unique": false,
        "type": "item",
        "combinable": true,
        "shouldClose": false,
        "useable": true
    },
    
    ....

Last updated