🟣EZ Lean Drug

Lean Drug is a roleplay drug processing script.

STEP 1 - Unzip and Add Script To Server

Unzip the script folder within your server resources folder. Ensure script in server.cfg ... "ensure ez_leandrug".

STEP 2 - Script Configuration

Script config located in shared/config.lua allows you to create multiple locations for different jobs, customise the job crafting (creating items from other items), usable items effects (armor, stress, time, ...), and so much more.

Stress Setup

If your server uses a stress system, you can configurate the function to remove stress...

RemoveStress = function(stress) -- Your remove stress event/export (Client) [Optional]
    TriggerServerEvent('hud:server:RelieveStress', stress)
end,

This is used when your player consumes an item which reduces stress. This can be configured for each item in the config file.

Thirst Setup

Every RP server has a thirst and hunger system. This function allows for thirst to be relieved (e.g. drink water)...

RelieveThirst = function(n) -- Removes n amount of thirst (Client)
    -- ESX
    --TriggerClientEvent("esx_status:add", source, "thirst", n * 10000)

    local QBCore = exports['qb-core']:GetCoreObject()
    -- QBCore
    TriggerServerEvent('consumables:server:addThirst', QBCore.Functions.GetPlayerData().metadata.thirst + n)
end,

Tracking System

This is an optional feature, which allows you to track the codeine trucking...

PoliceAlert = function(coords) -- Your police alert event/export (Client)
    TriggerServerEvent('police:server:policeAlert', "Codeine delivery in progress")
end,
RemoveTrackerItem = "trackerremover_device", -- Item to remove tracker
RemoveTracker = function() -- Add a custom minigame to remove tracker
    exports['boii-chiphack']:StartGame(function(success)
        if success then
            Ez_lib.Shared.TriggerNotify(nil, "Tracker Removed", "success")
            PoliceAlert.enabled = false
        else
            Ez_lib.Shared.TriggerNotify(nil, "Hack failed", "error")
        end
    end, 1, 60)
end,

You can update police alert. The item set is used to remove the tracker and the RemoveTracker function is what is called. It sets PoliceAlert.enabled to false when removed tracker.

Each location can have tracking system on or off, with a time interval with how long it takes for police to be notified each time.

Locations = { -- Locations to deliver codeine, add more if needed
    {
        ...
        policeAlert = { -- Police alert for location
            enabled = true, -- true = Enable this feature, false = No alerts
            time = 30, -- How often does police get location of vehicle, in Seconds
        },
        ...

Evidence Setup

If your server uses a evidence script, for checking if a player is high, you can set it up within the config file, by modifying the evidence function...

Evidence = function(status, duration) -- Your evidence event/export (Client) [Optional]
	-- Duration is in seconds
	if status == "weedsmell" then
		TriggerEvent('evidence:client:SetStatus', status, duration)
	elseif status == "widepupils" then
		TriggerEvent('evidence:client:SetStatus', status, duration)
	elseif status == "redeyes" then
		TriggerEvent('evidence:client:SetStatus', status, duration)
	end
end,

It is optional. You do not require a evidence system. Above is already setup for default QB-Core.

STEP 3 - Dependancy

Requires ez_lib!!! Download the script.

https://github.com/EZ-Scripts/ez_lib Ez_lib is required to be configurated to your Framework seperately. It can easily be switched from QBCore and ESX with ox_lib, ox_target and ox_inventory support. Anyother custom frameworks require ez_lib to be modified. Everything is set out in a simple way.

Ez_script is fully open source and acts like a bridge between other frameworks to allow you to run our fivem scripts on any framework you want to, even your own custom framework.

Last updated