Configuration

You can configure script in config.lua

CONFIG.LUA

Config = {}

Config.PlayersOnline = 0

Config.ScrapDestination = vector3(-576.5237, -1639.9725, 19.4127)

--  https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck
Config.UseMinigame = true -- If false use progress bar
Config.MinigameSetup = {'easy', 'easy','medium'}
Config.MarkerSettigs = {
    showMarker = false,
}
Config.DrawTextSettigs = {
    showText = false,
    text = "Scrapyard",
}

Config.ServerLimit = true -- Only 1 person can scrap vehicle on server

-- Give item when demonting.
Config.DemontingPartItems = {
    "screw",
    "gun_spring",
}

Config.ItemGiveByPart = {
    min=1,
    max=2,
}

Config.LegendaryItem = {
    chance=40, --%
    name="gun_spring",
    min=1,
    max=3
}

Config.ItemsPrice = {
    ["scrap"] = 100,
    ["screw"] = 50,
    ["tyre"] = 400,
}

Config.Mechanic = {
    model = "a_m_m_farmer_01",
    pos = vector4(1593.8262, -1688.4019, 88.0844, 185.1284),
}

Config.Progress = {
    removepart = 5000, 
    scrapvehicle = 4000,
}
 

-- You must have dispatch.lua set up
Config.PoliceJobs = {"police","sheriff"}
Config.SignalToPolice = {
    removePart = {
        signal = true,
        chance = 10, -- %
    },
    scrapvehicle = {
        signal = true,
        chance = 40, -- %
    },
}


Config.BlackListedVehicles = {
    "vigero", 
}     

CONFIGURE FRAMEWORK

You can configure your framework in BRIDGE/config.lua

--[[

  ____       _     _                               __ _       
 |  _ \     (_)   | |                             / _(_)      
 | |_) |_ __ _  __| | __ _  ___    ___ ___  _ __ | |_ _  __ _ 
 |  _ <| '__| |/ _` |/ _` |/ _ \  / __/ _ \| '_ \|  _| |/ _` |
 | |_) | |  | | (_| | (_| |  __/ | (_| (_) | | | | | | | (_| |
 |____/|_|  |_|\__,_|\__, |\___|  \___\___/|_| |_|_| |_|\__, |
                      __/ |                              __/ |
                     |___/                              |___/ 

]]--

local IS_SERVER = IsDuplicityVersion()

BRIDGE = {}

BRIDGE.Framework = "ESX" -- ESX / QB / OX

-- Supports inventory
-- ox_inventory  - https://github.com/overextended/ox_inventory
-- qb_inventory -  https://docs.qbcore.org/qbcore-documentation/
-- quasar_inventory - https://docs.quasar-store.com/assets-and-guides/inventory

BRIDGE.Inventory = "ox_inventory" -- ox_inventory, qb_inventory, quasar_inventory

BRIDGE.ESXOld = false -- Change on true when you use old version of ESX

BRIDGE.Target = "ox_target"  -- ox_target / qb_target

--[[ 
  _________                                        .__    .___      
 /   _____/ ______________  __ ___________    _____|__| __| _/____  
 \_____  \_/ __ \_  __ \  \/ // __ \_  __ \  /  ___/  |/ __ |/ __ \ 
 /        \  ___/|  | \/\   /\  ___/|  | \/  \___ \|  / /_/ \  ___/ 
/_______  /\___  >__|    \_/  \___  >__|    /____  >__\____ |\___  >
        \/     \/                 \/             \/        \/    \/ 
]]--

if IS_SERVER then
    BRIDGE.Notify =  function(playerId, notifyData)
        -- notifyData.title = NOTIFY TITLE
        -- notifyData.description = NOTIFY DESCRIPTION
        -- notifyData.type = NOTIFY TYPE  | TYPES: success, inform, error
        lib.notify(playerId, notifyData)
    end
end


--[[
_________ .__  .__               __           .__    .___      
\_   ___ \|  | |__| ____   _____/  |_    _____|__| __| _/____  
/    \  \/|  | |  |/ __ \ /    \   __\  /  ___/  |/ __ |/ __ \ 
\     \___|  |_|  \  ___/|   |  \  |    \___ \|  / /_/ \  ___/ 
 \______  /____/__|\___  >___|  /__|   /____  >__\____ |\___  >
        \/             \/     \/            \/        \/    \/ 
]]--

if not IS_SERVER then
    BRIDGE.Notify = function(notifyData)
        -- notifyData.title = NOTIFY TITLE
        -- notifyData.description = NOTIFY DESCRIPTION
        -- notifyData.type = NOTIFY TYPE  | TYPES: success, inform, error
        lib.notify(notifyData)
    end
end

CONFIGURE DISPATCH

Dispatch is set to cd_dispatch by default, but can be changed at any time in dispatch.lua

Last updated