❄️EZ Coke & Crack Drug

Coke 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_cokedrug".

STEP 2 - Script Configuration

Script config located in shared/config.lua allows you to create multiple locations for different purposes. Check out the config file.

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.

Tracking System

This is an optional feature, which allows you to track the planes if above a certain altitude...

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, and a option to set the minimum altitude to notify above.

Locations = { -- Locations to deliver codeine, add more if needed
    {
        ...
        policeAlert = { -- Police alert for location
	    enabled = true, -- true = Enable this feature, false = No alerts
	    onPlaneAltitude = 70, -- Altitude of plane to trigger alert
            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