πŸ”₯All scripts on our website are 50% off!πŸ”₯
Logo

Configuration

shared.lua (client and server side)

The configuration file (config/shared.lua) contains various settings that can be adjusted to customize the script's behavior. Below are some of the key configuration options:

  • Framework: Set to either "esx" or "qb" depending on the framework you are using.
  • ESXExport: If using a recent version of ESX, set the script name. Default is "es_extended".
  • Core: Default ESX: "esx:getSharedObject" | Default QB: "qb-core".
  • Mysql: Set to "oxmysql", "mysql-async", or "ghmattisql" depending on the MySQL plugin you are using.
  • propsRadius: Radius in which the props will be spawned.
  • hideProp: Set to true if you want the prop to be hidden after harvesting.
  • debug: Set to true to print debug messages in the console.
  • adminGroup: Admin group to access the admin panel.
  • command: Command to open the admin panel.
  • cooldown: Set a cooldown in milliseconds to harvest the same prop.
Config, Noti, Lang = {}, {}, {}

-- Use "esx" or "qb"
Config.Framework = "qb"
-- If you are using one of the most recent versions of ESX, set the script name. Default = "es_extended"
Config.ESXExport = "es_extended"
-- Default ESX: "esx:getSharedObject" | Default QB: "qb-core"
Config.Core = "qb-core"
-- oxmysql, mysql-async or ghmattisql
Config.Mysql = "oxmysql"
-- Radius in which the props will be spawned
Config.propsRadius = 20
-- Set to true if you want the prop to be hidden after harvesting
Config.hideProp = true
-- Set to true print debug messages in the console
Config.debug = false
-- Admin group to access the admin panel
Config.adminGroup = "admin"
-- Command to open the admin panel
Config.command = "drugscreator"
-- Set a cooldown in milisenconds to harvest the same prop
Config.cooldown = 20000

Target Configuration

Config.useTarget = true

function entityTarget(entity, event, label, drug, processType)
    local selector = nil
    if processType == "craft" then
        selector = "craft"
    else
        selector = "process"
    end
    exports["qb-target"]:AddTargetEntity(
        entity,
        {
            options = {
                {
                    type = "client",
                    event = event,
                    icon = "fas fa-box-circle-check",
                    label = label,
                    args = {
                        drug = drug,
                        process = selector
                    }
                }
            },
            distance = 3.0
        }
    )
end

Notifications

function notifications(notitype, message, time)
    -- Change this trigger for your notification system keeping the variables
    TriggerEvent("codem-notification", message, time, notitype)
end

-- Notifications types:
Noti.info = "info"
Noti.check = "check"
Noti.error = "error"

-- Notification time:
Noti.time = 5000

Language

Lang.alreadyExist = "There is already a drug by that name"
Lang.created = "The drug has been created correctly"
Lang.edited = "The drug has been edited successfully"
Lang.deleted = "The drug has been deleted"
Lang.collect = "Press ~g~[E]~w~ to collect"
Lang.collectTarget = "Collect"
Lang.collecting = "Collecting..."
Lang.cancelled = "The process has been cancelled"
Lang.craft = "Press ~g~[E]~w~ to craft"
Lang.craftTarget = "Craft"
Lang.notEnoughIngredients = "You don't have enough ingredients"
Lang.imported = "The drug has been imported successfully"
Lang.cooldown = "You must wait a few seconds to use this again"