Inventory integrations

KuzQuality | Placeable items

Adding "Place" options to your inventory system


qb-inventory (new)

qb-inventory/html/index.html

add the following line between lines 194 and 195

<li @click="placeItem(contextMenuItem)">Place</li>

Example:

<ul v-if="showContextMenu" class="context-menu" :style="{ top: contextMenuPosition.top, left: contextMenuPosition.left }">
  <li v-if="contextMenuItem.useable" @click="useItem(contextMenuItem)">Use</li>
  <li @click="placeItem(contextMenuItem)">Place</li>
  <li @mouseover="showSubmenu = true" @mouseleave="showSubmenu = false">

qb-inventory/html/app.js

add the following code between lines 623 and 624

async placeItem(item) {
	if (!item) {
		return;
	}
	  const playerItemKey = Object.keys(this.playerInventory).find((key) => this.playerInventory[key] && this.playerInventory[key].slot === item.slot);
	  if (playerItemKey) {
	  	try {
		    	await axios.post("https://kq_placeable_items/HookPlaceItem", {
		        	item: item.name,
				size: 1,
			});
			if (item.shouldClose) {
			    this.closeInventory();
			}
		} catch (error) {
			console.error("Error placing the item: ", error);
		}
	}
	this.showContextMenu = false;
},

qb-inventory (old)

qb-inventory/html/ui.html

add the following line between lines 36 and 37

Example:

qb-inventory/html/js/app.js

At the very of the file. Add the following


ps-inventory

ps-inventory/html/ui.html

add the following line between lines 63 and 64

Example:

ps-inventory/html/js/app.js

At the very of the file. Add the following


qs-inventory (Quasar) (Only v2)

qs-inventory will work automatically. No changes needed. Simply start this script after qs-inventory (Make sure that your qs-inventory is up to date)

If you are using the v3 version. It is not possible for us to add an integration. You will need to contact Quasar

es_extended (default inventory)

This might be a bit different depending on the version of your es_extended. Make sure to look at the surrounding lines of code around the new lines provider in the example

es_extended/client/functions.lua

Add the following line to the line 819

Example:

Add the following lines under the line 941 (originally 940)

Example:

es_extended/locales/en.lua (or the locale you use)

Add the following to line to your locale


lj-inventory

lj-inventory/html/js/app.js

Add the following code at the bottom of the file

lj-inventory/html/ui.html

Add the following line between lines 63 and 64 (Under the "item-give" element)

esx_inventoryhud

esx_inventoryhud/html/ui.html

Add the following line between line 34 and 35

Example:

esx_inventoryhud/html/js/inventory.js

Add the following on the line 259

Last updated