From 11cd9d5ac87c29d2ec301aaaac374d436c0fed06 Mon Sep 17 00:00:00 2001 From: Yuka Ayukawa <39555991+yukad2@users.noreply.github.com> Date: Sun, 4 Feb 2024 14:16:48 +0900 Subject: [PATCH] Update README.md Update the guide for latest qb-inventory --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d244042..b1672ad 100644 --- a/README.md +++ b/README.md @@ -149,23 +149,21 @@ Now, we need to format item data in our inventory. Firstly, find the *app.js* lo Now we will CTRL+F the following line:
```js -} else if (itemData.name == "harness") { +case "harness": ``` Once you have found this line, copy the following one line above it:
```js - } else if (itemData.name == "syphoningkit") { // Syphoning Kit (CDN-Fuel or CDN-Syphoning!) - $(".item-info-title").html("

" + itemData.label + "

"); - $(".item-info-description").html( - "

" + "A kit used to syphon gasoline from vehicles!

" + itemData.info.gasamount + " Liters Inside.

" + - "

Weight: " + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + " | Amount: " + itemData.amount - ); - } else if (itemData.name == "jerrycan") { // Jerry Can (CDN-Fuel!) - $(".item-info-title").html("

" + itemData.label + "

"); - $(".item-info-description").html( - "

" + "A Jerry Can, designed to hold fuel!

" + itemData.info.gasamount + " Liters Inside.

" + - "

Weight: " + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + " | Amount: " + itemData.amount - ); + case "syphoningkit": + // Syphoning Kit (CDN-Fuel or CDN-Syphoning!) + return `

${itemData.label}

+

A kit used to syphon gasoline from vehicles!

${itemData.info.gasamount} Liters Inside.

+

Weight: ${((itemData.weight * itemData.amount) / 1000).toFixed(1)} | Amount: ${itemData.amount}` + case "jerrycan": + // Jerry Can (CDN-Fuel!) + return `

${itemData.label}

+

A Jerry Can, designed to hold fuel!

${itemData.info.gasamount} Liters Inside.

+

Weight: ${((itemData.weight * itemData.amount) / 1000).toFixed(1)} | Amount: ${itemData.amount}` ``` **Again, if you have decay, you must add in the options yourself!**