EZ Scripts
DiscordTebex
  • 💡Welcome To EZ Scripts
  • FIVEM
    • 🍀EZ White Widow
      • Config File
      • Add more locations
      • Common Issues
    • 🟣EZ Lean Drug
      • Config File
      • Add more locations
    • ❄️EZ Coke & Crack Drug
      • Config File
      • Add more locations
    • 🔠EZ Plate Changer
      • Config File
    • 📑Ez Lib
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
  • RedM
    • 💼EZ Society & Job Meny
      • Config File
      • Exports
      • Syn Society
    • 🌍EZ Fast Travel
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🍖Ez Consumables
      • Config File
    • 📺Ez HUD
      • Config File
      • Exports and Events
    • 🚷EZ Combat Logging
      • Config File
    • 🗽EZ Life Style
      • Getting Life Style
      • Config File
    • ☢️EZ Radial Menu
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
Powered by GitBook
On this page

Was this helpful?

  1. FIVEM
  2. EZ Coke & Crack Drug

Config File

PreviousEZ Coke & Crack DrugNextAdd more locations

Last updated 7 months ago

Was this helpful?

❄️
https://github.com/EZ-Scripts/ez_cokedrug/blob/master/shared/config.lua
Config = {
    Locale = "en",
    RemoveStress = function(stress) -- Your remove stress event/export (Client) [Optional]
		TriggerServerEvent("hud:server:RelieveStress", stress)
	end,
	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,
    PoliceAlert = function(coords) -- Your police alert event/export (Client)
        TriggerServerEvent("police:server:policeAlert", "Coke Delivery in progress")
    end,
}


--[[
██████╗░██╗░░░░░░█████╗░███╗░░██╗███████╗
██╔══██╗██║░░░░░██╔══██╗████╗░██║██╔════╝
██████╔╝██║░░░░░███████║██╔██╗██║█████╗░░
██╔═══╝░██║░░░░░██╔══██║██║╚████║██╔══╝░░
██║░░░░░███████╗██║░░██║██║░╚███║███████╗
╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝░░╚══╝╚══════╝

Read the guide on how to add more locations on the Documentation.
]]
Config.PlaneLocations = { -- Locations to deliver coke, add more if needed
	{
		planeModel = "dodo", -- Model of plane
		target = { -- Target/ Press E Location to init delivery
			label = Loc[Config.Locale].target["StartPlaneDelivery"], -- Label for location
			icon = "fas fa-plane", -- Icon for location
			coords = vector4(456.11, 5566.4, 781.18, 92.37),
			width = 2.0,
			length = 2.0,
		},
		blip = { -- Blip for location at coords
			enabled = true,
			name = Loc[Config.Locale].target["StartPlaneDelivery"],
			sprite = 51,
			scale = 0.7,
			col = 30,
		},
		ped = { -- spawn peds at init delivery location
			enabled = true,
			coords = vector4(456.11, 5566.4, 781.18, 92.37),
			model = "s_m_m_doctor_01",
		},
		flightLocations = { -- Where Planes may spawn and need to be delivered to by chance, add more if needed
			{
				start = {
					cokeTable = vector4(2128.97, 4778.26, 40.97, 132.32), -- Location of coke table to collect coke bricks from
					plane = vector4(2133.0, 4785.41, 40.78, 26.4), -- Where plane will spawn
				},
				finish = {
					ped = vector4(1700.72, 3286.77, 41.15, 201.88), -- Ped to deliver to
					plane = vector4(1702.45, 3273.56, 41.16, 238.97), -- Where to park plane
				}
			},
			{
				start = {
					cokeTable = vector4(1729.82, 3322.67, 41.22, 11.41),
					plane = vector4(1732.21, 3307.29, 42.03, 195.98),
				},
				finish = {
					ped = vector4(2097.78, 4774.58, 41.14, 151.24),
					plane = vector4(2092.76, 4768.21, 41.21, 262.15),
				}
			},
		},
		minPlaneHealthRequired = {body = 750, engine = 750}, -- Minimum health required to receive items below
		receive = { -- Receive items per delivery, you can add more items if needed
			["coke_brick"] = math.random(1, 2), -- How much Coke Brick you recieve every delivery
		},
		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
		},
		cooldown = { -- Cooldown for location
			enabled = true, -- true = Enable this feature, false = No cooldown
			time = 30, -- Cooldown time in Minutes
		},
	},
}


--[[
██████╗░██████╗░░█████╗░░█████╗░███████╗░██████╗░██████╗██╗███╗░░██╗░██████╗░
██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔════╝██╔════╝██║████╗░██║██╔════╝░
██████╔╝██████╔╝██║░░██║██║░░╚═╝█████╗░░╚█████╗░╚█████╗░██║██╔██╗██║██║░░██╗░
██╔═══╝░██╔══██╗██║░░██║██║░░██╗██╔══╝░░░╚═══██╗░╚═══██╗██║██║╚████║██║░░╚██╗
██║░░░░░██║░░██║╚█████╔╝╚█████╔╝███████╗██████╔╝██████╔╝██║██║░╚███║╚██████╔╝
╚═╝░░░░░╚═╝░░╚═╝░╚════╝░░╚════╝░╚══════╝╚═════╝░╚═════╝░╚═╝╚═╝░░╚══╝░╚═════╝░

Read the guide on how to add more locations on the Documentation.
]]
Config.ProcessingLocations = {
	{
		target = { -- Target/ Press E Location for Processing Location
			label = Loc[Config.Locale].target["ProcessingCocaine"],
			icon = "fas fa-flask", -- For Target Only
			coords = vector4(1093.21, -3195.64, -38.93, 0),
			width = 2.0,
			length = 2.0,
		},
		blip = { -- Blip for location at coords
			enabled = true,
			name = Loc[Config.Locale].target["ProcessingCocaine"],
			sprite = 51,
			scale = 0.7,
			col = 30,
		},
		requiredItem = "coke_blueprint", -- Required item to process or false
		crafting = { -- Crafting data
			Items = { -- Items to allow craft and its recipe
				{ item = "coke_1oz", recipe = { ["coke_brick"] = 1}, amount = math.random(25, 30) },
				{ item = "coke_1oz", recipe = { ["coke_brick"] = 3}, amount = math.random(60, 85) },
			},
			Menu = { -- Menu data
				header = Loc[Config.Locale].menu["Cocaine"], -- Menu header
			},
			Progress = { -- Progress Bar data
				label = Loc[Config.Locale].progress["Processing"],
				time = 15,
				animation = { animDict = "anim@amb@business@coc@coc_unpack_cut_left@", anim = "coke_cut_v5_coccutter" },
			}
		}
	},
	{
		target = {
			label = Loc[Config.Locale].target["CocaineCutting"],
			icon = "fas fa-flask",
			coords = vector4(1086.43, -3197.23, -37.9, 93.9),
			width = 2.0,
			length = 2.0,
		},
		blip = {
			enabled = false,
			name = Loc[Config.Locale].target["CocaineCutting"],
			sprite = 51,
			scale = 0.7,
			col = 30,
		},
		requiredItem = false,
		crafting = {
			Items = {
				{ item = "coke_baggy", recipe = { ["coke_1oz"] = 5, ["empty_weed_bag"] = 100, }, amount = math.random(90, 100) },
			},
			Menu = {
				header = Loc[Config.Locale].menu["CocaineCutting"],
			},
			Progress = {
				label = Loc[Config.Locale].progress["Processing"],
				time = 15,
				animation = { animDict = "amb@prop_human_parking_meter@female@base", anim = "base_female" },
			}
		}
	},
	{
		target = {
			label = Loc[Config.Locale].target["ProcessingCrack"],
			icon = "fas fa-flask",
			coords = vector4(2438.01, 4975.88, 46.98, 314.0),
			width = 2.0,
			length = 2.0,
		},
		blip = {
			enabled = true,
			name = Loc[Config.Locale].target["ProcessingCrack"],
			sprite = 51,
			scale = 0.7,
			col = 30,
		},
		requiredItem = false,
		crafting = {
			Items = {
				{ item = "crack_baggy", recipe = { ["coke_1oz"] = 1, ["bakingpowder"] = 15, ["empty_weed_bag"] = 40, }, amount = math.random(35, 40) },
				{ item = "crack_baggy", recipe = { ["coke_baggy"] = 5, ["bakingpowder"] = 2, ["empty_weed_bag"] = 9,  }, amount = math.random(7, 9) },
			},
			Menu = {
				header = Loc[Config.Locale].menu["Crack"],
			},
			Progress = {
				label = Loc[Config.Locale].progress["Processing"],
				time = 7,
				animation = { animDict = "amb@prop_human_bbq@male@base", anim = "base" },
			}
		}
	},
}


--[[
░█████╗░░█████╗░███╗░░██╗░██████╗██╗░░░██╗███╗░░░███╗░█████╗░██████╗░██╗░░░░░███████╗░██████╗
██╔══██╗██╔══██╗████╗░██║██╔════╝██║░░░██║████╗░████║██╔══██╗██╔══██╗██║░░░░░██╔════╝██╔════╝
██║░░╚═╝██║░░██║██╔██╗██║╚█████╗░██║░░░██║██╔████╔██║███████║██████╦╝██║░░░░░█████╗░░╚█████╗░
██║░░██╗██║░░██║██║╚████║░╚═══██╗██║░░░██║██║╚██╔╝██║██╔══██║██╔══██╗██║░░░░░██╔══╝░░░╚═══██╗
╚█████╔╝╚█████╔╝██║░╚███║██████╔╝╚██████╔╝██║░╚═╝░██║██║░░██║██████╦╝███████╗███████╗██████╔╝
░╚════╝░░╚════╝░╚═╝░░╚══╝╚═════╝░░╚═════╝░╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═════╝░╚══════╝╚══════╝╚═════╝░

-- Credit for props: https://www.gta5-mods.com/misc/styrofoam-double-cup-with-lean 

Built in Effects:
	- StaminaEffect(time(sec)) -- Gives player stamina for time in seconds.

Each Consumable can have... ALL OPTIONAL
	- Armour = int -- Amount of armour to give player
	- Stress = int -- Amount of stress to remove from player
	- Hunger = int -- Amount of hunger to remove from player
	- Thirst = int -- Amount of thirst to remove from player
	- RequiredItems = {["item"] = int} -- Required items to use the consumable
	- RemoveItem = bool -- Remove the item after use
	- Progress = { -- Progress bar settings
		label = string, -- Label of the progress bar
		time = int, -- Time in seconds to complete the progress
		animation = {task = string}, -- Animation to play while doing the progress
		animationInCar = { animDict = string, anim = string}, -- Optional Animation in car
		animationOptions = { Prop = string, PropBone = int, PropPlacement = {x, y, z, xRot, yRot, zRot}, EmoteMoving = bool, EmoteLoop = bool, EmoteStuck = bool}, -- Prop to attach to player
	}
	- Success = function() -- Function to run when progress is successful
]]
Config.Consumables = {
	crack_baggy = {
        Armour = 5,
        Stress = 30,
		RemoveItem = true,
		RequiredItems = {["lighter"] = 1},
		Progress = {
			label = Loc[Config.Locale].progress["Smoking"],
			time = 10,
			disableCombat = true,
            animation = {animDict = "switch@trevor@trev_smoking_meth",anim = "trev_smoking_meth_loop"},
            animationOptions = { EmoteMoving = true, EmoteLoop = true,},
		},
		Success = function()
			-- Anything you want to do when the progress is successful
			CrackEffect(30)
			StaminaEffect(10)
			Config.Evidence("redeyes", 200)
			Config.Evidence('widepupils', 300)
		end,
		Cancelled = function()
			-- Anything you want to do when the progress is cancelled
			Ez_lib.Shared.TriggerNotify(nil, Loc[Config.Locale].error["cancelled"], "error")
		end,
    },
	coke_baggy = {
        Armour = 20,
        Stress = 10,
		RemoveItem = true,
		Progress = {
			label = Loc[Config.Locale].progress["Sniffing"],
			time = 5,
			disableCombat = true,
            animation = {animDict = "switch@trevor@trev_smoking_meth",anim = "trev_smoking_meth_loop"},
            animationOptions = { EmoteMoving = true, EmoteLoop = true,},
		},
		Success = function()
			-- Anything you want to do when the progress is successful
			CocaineEffect(30)
			Config.Evidence('widepupils', 300)
		end,
		Cancelled = function()
			-- Anything you want to do when the progress is cancelled
			Ez_lib.Shared.TriggerNotify(nil, Loc[Config.Locale].error["cancelled"], "error")
		end,
    },
}


--[[
██████╗░░█████╗░░██████╗░░██████╗░██╗███╗░░██╗░██████╗░
██╔══██╗██╔══██╗██╔════╝░██╔════╝░██║████╗░██║██╔════╝░
██████╦╝███████║██║░░██╗░██║░░██╗░██║██╔██╗██║██║░░██╗░
██╔══██╗██╔══██║██║░░╚██╗██║░░╚██╗██║██║╚████║██║░░╚██╗
██████╦╝██║░░██║╚██████╔╝╚██████╔╝██║██║░╚███║╚██████╔╝
╚═════╝░╚═╝░░╚═╝░╚═════╝░░╚═════╝░╚═╝╚═╝░░╚══╝░╚═════╝░

Baging drugs into empty bags to become usable or sold.
]]
Config.BagUsables = { -- Use the item and change it to something else
	coke_1oz = {
		RequiredItems = {["drug_scales"] = 1}, -- Required item to use
		RemoveItem = true, -- Removes original item[coke_1oz] (true) or not (false)
		GiveItem = {item = "coke_baggy", amount = 25}, -- Item to give
		Progress = {
			label = "Scalling Coke into bags",
			time = 5, -- Time in seconds
			animation = {
				animDict = 'amb@prop_human_parking_meter@female@base', -- Animation dictonary 
				anim = 'base_female', -- Animation 
			},
			animationOptions = {EmoteMoving = true, EmoteLoop = true,}
		}
	}
}

-- DO NOT TOUCH BELOW THIS LINE
ResourceName = GetCurrentResourceName()