🟣Ns-LeanDrug

Lean Processing

-----INSTALLATION-----

STEP 1 - Unzip and Add Script To Server

Unzip the script folder within your server resources folder. Ensure script in server.cfg ... "ensure ns-leandrug". ( NOTE : Please don't change the script name or folder name.)

STEP 2 - Script Configuration

When you open the config file you'll see a lines of codes to configure it to your server.

STEP 2.1 - Dependency Configuration

Framework = "qb-core", -- framework folder name
Target = "qb-target", -- qb-target or ox_target (If you have renamed qb-target then enter the name you have renamed it to)
Notify = "qb", -- "qb" or "okok" or "infinity" or "rr" or "t"
Menu = "qb", -- qb or ox
Inv = "qb", -- qb or ox
Phone = "qb", -- qb, qs or other. If you select other, open phone.lua and add your server phone trigger.
Fuel = "LegacyFuel", -- "LegacyFuel" or "ps-fuel" or anyother which uses SetFuel Export

STEP 2.2 - Consumable Effects

Lean = {-- Lean Effects
    Enable = true, -- If you want to make it consumable
    armour = 30, -- %
    thirst = 50, -- %
    stress = 30, -- %
    consumetime = 5 -- Time in Seconds
},

Codeine = {-- Codeine Bottle Effects. This will only apply on "codeine_bottle"
    Enable = true, -- If you want to make it consumable
    armour = 0, -- %
    thirst = 0, -- %
    stress = 30, -- %
    consumetime = 5 -- Time in Seconds
}

You can edit what each consumable item gives your player. Lean also has a sprinting effect on your player, allowing him to run faster.

Here are the custom props provided within my script:

STEP 2.3 - Location Configuration

You can add multiple truck spawn and delivery locations for your codeine delivery. The script randomly chooses the locations you input inside the config.lua. More locations means more immerse script for players in your server.

SpawnLocations = { -- Where Trucks may spawn
    [1] = vector4(854.98, -3145.19, 5.9, 5.57),
    [2] = vector4(963.58, -1707.19, 30.06, 177.17),
    [3] = vector4(-2013.07, -471.65, 11.52, 51.78),
},
DeliveryLocations = { -- Where to deliver trucks
    [1] = vector4(-702.14, 5774.57, 17.33, 250.09),
    [2] = vector4(-186.81, 3687.05, 44.1, 210.98),
    [3] = vector4(271.42, -172.94, 60.54, 249.64),
    [4] = vector4(293.08, -610.11, 43.37, 254.83)
},

You can also add multiple processing locations for lean.

CraftingLocations = { -- Location to create lean
        [1] = vector4(1394.59, 3600.98, 39.91, 203.6),
},

STEP 2.4 - Enable Blips and Peds

In some cases you have the option to have blips for processing and trucking locations, and ped for trucking location. You are able to disable it from the config.lua

STEP 2.5 - Blackmarket

BlackMarket = {
    label = "BlackMarket",
    slots = 1,
    items = { -- You need to add your own items here, any you want
        { name = "trackerremover_device",       	 price = 400,    amount = 50,  info = {}, type = "item", slot = 1 },
    },
},

Blackmarket is a feature set at the location where players can start truck job. Its set to allow players to mainly be able to purchase a tracker remover. You are able to add more items if you would like to, for example lockpick.

STEP 2.6 - Dispatch Configuration

Instead of using the default qbcore dispatch system like I have used, you are able to easily add your own dispatch system within the script by heading over to client/custom/tracker.lua and updating the TriggerEvent.

You can always join the support discord and create a ticket for help.

STEP 3 - Inventory Images

Add your images to your inventory script, e.g:

[qb] > qb-inventory > html > images

STEP 4 - Add Items to QbCore

In [qb] > qb-core > shared> items.lua

["sprite"] 			= {["name"] = "sprite", 	            ["label"] = "Sprite", 		["weight"] = 500, 		["type"] = "item", 		["image"] = "sprite.png", 			["unique"] = false, 		["useable"] = true, 	["shouldClose"] = true,   ["combinable"] = nil,   ["description"] = ""},
["lean"] 			= {["name"] = "lean", 		            ["label"] = "Lean", 		["weight"] = 500, 		["type"] = "item", 		["image"] = "lean.png", 			["unique"] = false, 		["useable"] = true, 	["shouldClose"] = true,   ["combinable"] = nil,   ["description"] = ""},
["cup"] 			= {["name"] = "cup", 		            ["label"] = "Plastic Cup", 		["weight"] = 500, 		["type"] = "item", 		["image"] = "cup.png", 				["unique"] = false, 		["useable"] = false, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = ""},
["codeine_bottle"] 		= {["name"] = "codeine_bottle",             ["label"] = "Codeine Bottle", 	["weight"] = 500, 		["type"] = "item", 		["image"] = "codeine_bottle.png", 		["unique"] = false, 		["useable"] = false, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = ""},
["trackerremover_device"] 	= {["name"] = "trackerremover_device",      ["label"] = "Tracker Remover", 	["weight"] = 500, 		["type"] = "item", 		["image"] = "trackerremover_device.png", 	["unique"] = false, 		["useable"] = false, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = ""},

STEP 5 - Tracker

The vehicle tracker is a feature to involve the police in drug processors and for the better of the economy of your rp server.

It can be easily disabled within the config.lua... Enable = false

PoliceAlert = {
    Enable = true, -- true = Enable this feature, false = No alerts
    time = 30, -- How often does police get location of vehicle, in Seconds
    RemoveTrackerItem = {
        item = "trackerremover_device",
        time = 60,
        chips = 5,
    },
}

You can also change the hacking item to something else.

On default, ns-leandrug uses boii's hacking minigame. You are able to change that within client/custom/tracker.lua.

RegisterNetEvent("ns-leandrug:trackerhack", function()
    exports['boii-chiphack']:StartGame(function(success)
    if success then
        IsTracker = false -- Do not remove
    else
        triggerNotify(Locale["DrugProcessing"], "Hack failed", "error")
    end
    end, CodeineTruck.PoliceAlert.RemoveTrackerItem.chips, CodeineTruck.PoliceAlert.RemoveTrackerItem.time)
end)

Preview Video

TEBEX

Link to Purchase Escrow ($5.99): https://ns-scripts.tebex.io/package/5821349 Link to Purchase Open Source ($14.99): https://ns-scripts.tebex.io/package/5821354

Discord

Discord Link

Last updated