[PAID][ESX] Druglabs | MK-Services

A script by Pain1435

No reviews yet.
[PAID][ESX] Druglabs | MK-Services main image

Full Description

This resource is compatible with ESX v1.1 / ESX 1.2 (v1 Final) / ESX Legacy (v1.3 - v1.5)/ Extendedmode.

Description

Configurable, robbable and raidable Druglabs for fractions/gangs

Features

  • Fully customizable labs, recipes and processing times
  • Item storage in labors
  • Multiple types of Druglabs
  • Configurable Druglab types with unique recipes
  • Each type can have a different Interior
  • You can raid a lab and gain ownership
  • Lab needs to be purchased by fractions/gangs
  • Police can neutralize Druglab
  • Configurable logs for item Storage
  • Adjustable notification event
  • Adjustable cooking process
  • Robbing other laboratories
  • ESX events and prefix customizable
  • Low performance consumption (0.02ms - 0.05ms)

Requirements

  • mk_progressbar

Showcase: Click me
Buy: Click me (Secured by FiveM Escrow System)

Config Snippets:

MK = {}

MK.Language = "en"

MK.ESXSharedObject = 'esx:getSharedObject'
MK.ESXPlayerLoaded = 'esx:playerLoaded'
MK.ESXSetJob = 'esx:setJob'

MK.Labs = { 
    ["lab"] = {
        entry = { x = 312.02688, y = -1928.875, z = 24.999656, h = 52.480396 }, -- Location of the Entry
        robberycd = 0, -- Should always be 0
        owner = "NONE", -- Leave it 
        type = "coke", -- Labtype
        price = 5000, -- Price to buy lab
        dimension = 567, -- Dimension from 1-999 (Standard is 0)
    },

    -- Example for a new Lab entry
    ["lab2"] = {
        entry = { x = 308.37631, y = -1928.769, z = 24.750286, h = 133.69641 }, 
        robberycd = 0, 
        owner = "NONE", 
        type = "coke",
        price = 5000,
        dimension = 232, -- Dimension from 1-999 (Standard is 0)
    }
}

MK.LabTypes = {
    ["meth"] = {
       ["positions"] = {
            productionpos = { x = 1005.7746, y = -3200.304, z = -38.51933, h = 175.2386 },
            invpos = { x = 1017.2973, y = -3200.2, z = -38.99319, h = 264.58386 },
            leavepos = { x = 997.13, y = -3200.65, z = -36.39 },
            tempsetting = { x = 1002.6732, y = -3199.77, z = -38.99311, h = 126.49873 },
            gassetting = { x = 1007.8777, y = -3199.161, z = -38.99316, h = 357.13159 },
            ventsetting = { x = 1010.6523, y = -3197.051, z = -38.99314, h = 177.95149 },
            stirsetting = { x = 1006.6481, y = -3197.707, z = -38.99316, h = 266.09423 },
            coolingpos = { x = 1007.8898, y = -3195.07, z = -38.99317, h = 0.1328972 },
       },
       ["recipe"] = {
            -- WARNING: Only use 3 Ingredients max
            ["ingredients"] = {
                {
                    item = "mk_pseudoephedrin",
                    amount = 20
                },
                {
                    item = "mk_batteryacid",
                    amount = 5
                },
                {
                    item = "mk_antifreeze",
                    amount = 5
                },
            },
            ["product2"] = "mk_methtray",
            ["finalproduct"] = "mk_methbag"
       }
    },
    ["coke"] = {
        ["positions"] = {
             productionpos = { x = 1092.8812, y = -3196.648, z = -38.99346, h = 354.62237 },
             invpos = { x = 1087.2276, y = -3194.497, z = -38.99346, h = 82.001106 },
             leavepos = { x = 1088.6712, y = -3187.704, z = -38.99346, h = 174.31565 },
             tempsetting = { x = 1093.716, y = -3199.097, z = -38.99348, h = 173.00265 },
             gassetting = { x = 1090.0618, y = -3199.128, z = -38.99348, h = 179.62173 },
             ventsetting = { x = 1099.2424, y = -3193.208, z = -38.99347, h = 352.91201 },
             stirsetting = { x = 1094.6358, y = -3193.017, z = -38.99347, h = 6.2413296 },
             coolingpos = { x = 1097.044, y = -3192.833, z = -38.99347, h = 353.24649 },
        },
        ["recipe"] = {
            ["ingredients"] = {
                {
                    item = "mk_pseudoephedrin",
                    amount = 20
                },
                {
                    item = "mk_batteryacid",
                    amount = 5
                },
                {
                    item = "mk_antifreeze",
                    amount = 5
                },
            },
            ["product2"] = "mk_methtray",
            ["finalproduct"] = "mk_methbag"
        }
     }
}

MK.Blips = {
    Lab = {
        Enabled = true,
        Sprite = 499,
        Scale = 0.8,
        Color = 0
    },
    Robbery = {
        Enabled = true,
        Sprite = 161,
        Scale = 2.0,
        Color = 3
    }
}

-- Gain ownership when successfully robbing a lab
MK.RobbingTakesOverLab = true

-- Max amount of labs each fraction can own
MK.MaxLabs = 1

MK.Markers = {
    Entry = {
        Type = 21,
        Scale = { x = 1.5, y = 1.5, z = 1.5 },
        Color = { r = 255, g = 255, b = 255, alpha = 100 }
    },
    Leave = {
        Type = 21,
        Scale = { x = 1.5, y = 1.5, z = 1.5 },
        Color = { r = 255, g = 255, b = 255, alpha = 100 }
    },
    Interaction = {
        Type = 20,
        Scale = { x = 1.5, y = 1.5, z = 1.5 },
        Color = { r = 255, g = 255, b = 255, alpha = 100 }
    },
    Rob = {
        Type = 20,
        Scale = { x = 0.5, y = 0.5, z = 0.5 },
        Color = { r = 255, g = 255, b = 255, alpha = 100 }
    }
}

-- Base Amount you get from Cooking Process
MK.BaseCookingAmount = 50 

-- Time to Rob a Lab in Seconds
MK.Robtime = 10

-- Time to cool Meth in minutes
MK.Coolingtime = 1

-- Time to cook Meth in minutes
MK.Productiontime = 1 

-- Needed Players to rob
MK.NeededPlayersToRob = 2

--Notification handling
MK.Notify = function(type, message)
    if type == 'success' then
        ESX.ShowNotification(message, 4000, 'success')
    elseif type == 'warning' then
        ESX.ShowNotification(message, 4000, 'error')
    elseif type == 'error' then
        ESX.ShowNotification(message, 4000, 'error')
    elseif type == 'info' then
        ESX.ShowNotification(message, 4000, 'info')
    end
end

--Recipe for Meth cooking
-- WARNING: Only use 3 Ingredients max
MK.Recipes = {
    {
        label = "pseudoephedrin",
        item = "mk_pseudoephedrin",
        amount = 20
    },
    {
        label = "battery_acid",
        item = "mk_batteryacid",
        amount = 5
    },
    {
        label = "antifreeze",
        item = "mk_antifreeze",
        amount = 5
    },
}


-- Blacklisted Jobs for Robbery
MK.Blacklist = {
    ["ambulance"] = true,
    ["unemployed"] = true,
}

-- Name of the police job
MK.Policejob = "mrpolice"

MK.onlyLabItems = true

MK.UseLimitSystem = true  -- false for ESX Weight

-- Default location if the lab cannot be determined
MK.StandardLeaveLocation = { x = 311.34085, y = -1920.921, z = 25.274682, h = 341.83639 }

Code is accessible No
Subscription-based No
Lines (approximately) LUA: ~2000 UI: 400
Requirements mk_progressbar
Support Yes