/cdn-syphoning

Gas prices too high? Don't want to buy your own gas? Just steal it! CDN-Syphoning adds syphoning functionality based off an item. The way players get this item is up to you! Players will use the item next to vehicles and be able to steal the gas from the vehicle or refuel the vehicle with the gas they obtained from syphoning.

Primary LanguageLuaGNU General Public License v3.0GPL-3.0

Codine Development Syphoning Script Banner

CDN-Syphoning

Gas prices too high? Don't want to buy your own gas? Just steal it! CDN-Syphoning adds syphoning functionality based off an item. The way players get this item is up to you! Players will use the item next to vehicles and be able to steal the gas from the vehicle, or refuel the vehicle with the gas they obtained from syphoning.

Important

This repository is merged with our cdn-fuel system, which has been released.

This resource, cdn-syphoning, is a standalone version of the syphoning, which is available as a config option for the cdn-fuel resource. Only use this resource if you DO NOT have cdn-fuel installed!

Dependencies:



Codine Development Syphoning Script Install Banner

Begin your installation

Here, we shall provide a step-by-step guide on installing cdn-syphoning to your server! Trust us, it is super quick, so don't worry! We know following instructions that are written down can be confusing, so we included some helpful install gifs below!

Step 1:

First, we will start by downloading the repository. Once downloaded, renamed the resource from cdn-syphoning-main to just cdn-syphoning.

Then, we will drag it into our resources folder. We recommend putting it in your qb directory or standalone.

step 1

Step 2:

Next, we're going to get the item added into our server! This is fairly simple.

Copy and Paste the following into your items.lua in QB-Core/Shared/items.lua
If you have the decay system setup, add the necessary compenents for that as well!

["syphoningkit"]				 = {["name"] = "syphoningkit", 					["label"] = "Syphoning Kit", 			["weight"] = 5000, 		["type"] = "item", 		["image"] = "syphoningkit.png", 		["unique"] = true, 		["useable"] = true, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = "A kit made to siphon gasoline from vehicles."},

step 2

Next, we will add the image, located @ cdn-syphoning/assets/syphoningkit.png into your images folder in your inventory resource!

Drag or CTRL+X the syphoningkit.png to the following directory: inventoryname/html/images step 2 images

Step 3:

Lastly, we need to get proper formatting for our itemData in the qb-inventory! If using another inventory such as LJ-Inventory, the process should be that same.

We want to navigate to our app.js in your inventory resource. This is usually located here: inventoryname/html/js/app.js*

Once you have opened the app.js, hit CTRL+F, and search for the following string:

} else if (itemData.name == "harness") {

Once you have found this line, copy the following one line above it:

        } else if (itemData.name == "syphoningkit") { // Syphoning Kit (CDN-Fuel or CDN-Syphoning!)
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html(
                "<p>" + "A kit used to syphon gasoline from vehicles! <br><br>" + itemData.info.gasamount + " Liters Inside.</p>" +
                "</span></p><p style=\"padding-top: .8vh;font-size:11px\"><b>Weight: </b>" + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + " | <b>Amount: </b> " + itemData.amount
            );

If using decay, you must add the quality part at the end yourself!



You can also follow this GIF to better understand the process!

step 3

Step 4:

Lastly, we will ensure the resource in our server.cfg. This is only neccessary if it is not in a directory that has been ensured already.

To ensure, just add this into your server.cfg:

ensure cdn-syphoning

Optional Step 5:

If you wish, we have preconfigured an item for the qb-shops config, you can use this to add the syphoningkit to your shops or add it yourself:

        [10] = {
            name = "syphoningkit",
            price = 5000,
            amount = 5,
            info = { gasamount = 0 },
            type = "item",
            slot = 10,
        }, -- Example for Required Job 

You will most likely have to change the slot it is in for it to work properly!

In order to use the /giveitem command, you must follow this below.

Navigate to inventoryname/server/server.lua, and CTRL + F the following line:

				elseif itemData["name"] == "harness" then
					info.uses = 20

Now we will add the following above the line below:
				elseif itemData["name"] == "syphoningkit" then
					info.gasamount = 0

Alternatively, watch this GIF to better understand the process:
Step 5 GIF
Otherwise, when spawning the item via /giveitem, there will be an error on use!

Codine Development Syphoning Script Features Banner

Some features to mention within this cdn-syphoning

  • Configurable Maximum amount for the Syphoning Kit!
  • Easily Configurable Animations!
  • Built in Debug Mode in case you want to make changes!
  • Configurable Police Notifications


Codine Development Syphoning Script Showcase Banner

Demonstration of the script

Here's a video showcasing the script in action!

Click Here to Watch the Video!



Codine Development Syphoning Script Future Plans banner

Future Plans

  • Send suggestions in our discord server! Link below!


Codine Development Links Banner

Codine Links