TxglsScripting
  • 🔊txgls-loadscreen
    • Index.html
  • 🍖txgls-butcherjob
    • config.lua
    • ox_inventory
    • qb-inventory
    • okokNotify
  • 🧑‍🌾txgls-farmingjob
    • config.lua
    • ox_inventory
    • qb-inventory
    • farming_data.sql
Powered by GitBook
On this page
  1. txgls-butcherjob

config.lua

You will need to edit the locations of things to where you want them. The locations work but may not fit your server. You can put the locations anywhere you want so if you have your own MLO or building then that is completely fine just remember to change the vector3 values in the locations.

Config = {}

Config.Framework = 'qb'          -- QBCore (qb), support for ESX soon.
Config.Target = 'ox'             -- qb-target (qb) / ox_target (ox)
Config.Inventory = 'ox'          -- qb-inventory (qb) / ox_inventory (ox)
Config.NotifyType = 'qb'         -- qb / ox
Config.Menu = 'qb'               -- qb / ox
Config.FuelSystem = 'LegacyFuel' -- 'qb-fuel' / 'LegacyFuel' / 'cdn-fuel'

Config.Progress = function(time, label, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
    exports['progressbar']:Progress({
        name = "butcher_progress",
        duration = time,
        label = label,
        useWhileDead = useWhileDead,
        canCancel = canCancel,
        controlDisables = disableControls,
        animation = animation,
        prop = prop,
        propTwo = propTwo,
    }, function(cancelled)
        if not cancelled then
            if onFinish then onFinish() end
        else
            if onCancel then onCancel() end
        end
    end)
end

Config.Notify = function(message, type)
    TriggerEvent('txgls-butcherjob:notify', message, type)
end

Config.SetFuel = function(vehicle, fuelLevel)
    if Config.FuelSystem == 'qb-fuel' then
        exports['qb-fuel']:SetFuel(vehicle, fuelLevel)
    elseif Config.FuelSystem == 'LegacyFuel' then
        exports['LegacyFuel']:SetFuel(vehicle, fuelLevel)
    elseif Config.FuelSystem == 'cdn-fuel' then
        exports['cdn-fuel']:SetFuel(vehicle, fuelLevel)
    end
end

Config.GiveKeys = function(vehicle)
    local plate = GetVehicleNumberPlateText(vehicle)
    if Config.Framework == 'qb' then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    end
end

Config.RequireJob = false    -- If you want to use a job from (qb-core/shared/jobs.lua) set this to true.
Config.JobName = "butcher"   -- Name of the job you want the have access.

Config.PaymentType = 'cash'
Config.EnableLogging = true

Config.Blip = {
    enable = true,
    coords = vector3(961.90, -2189.10, 30.51),   -- Blip location.
    sprite = 141,
    scale = 0.8,
    color = 1,
    label = "Butcher Shop"
}

Config.Locations = {
    jobStart = {
        coords = vector3(-76.72, 6265.74, 31.36),
        heading = 0.0,
        pedModel = `a_f_m_bevhills_01`,
        label = "Start Butcher Job",
        icon = "fas fa-briefcase"
    },
    meatCollection = {
        coords = vector3(-95.45, 6207.12, 31.03),
        label = "Collect Raw Meat",
        icon = "fas fa-drumstick-bite"
    },
    handWash = {
        coords = vector3(-100.29, 6202.64, 31.03),
        label = "Wash Hands",
        icon = "fas fa-hands-wash"
    },
    meatCutting = {
        coords = vector3(-104.63, 6207.38, 30.99),
        label = "Cut Meat",
        icon = "fas fa-cut"
    },
    meatPackaging = {
        coords = vector3(-86.7, 6212.82, 31.18),
        label = "Package Meat",
        icon = "fas fa-box"
    },
    vehicleSpawn = {
        coords = vector3(-73.28, 6284.7, 31.49),
        heading = 90.0,
        model = "speedo",
        label = "Get Delivery Van",
        icon = "fas fa-truck",
        blip = {
            sprite = 477,
            color = 2,
            scale = 0.8,
            label = "Get Delivery Van"
        }
    },
    vehicleReturn = {
        coords = vector3(-68.52, 6280.34, 31.37),
        heading = 270.0,
        label = "Return Delivery Van",
        icon = "fas fa-truck-loading",
        blip = {
            sprite = 477,
            color = 3,
            scale = 0.8,
            label = "Return Delivery Van"
        }
    }
}

Config.MeatCollection = {
    cooldownTime = 0,     -- 5000 is 5 seconds.
    minAmount = 1,
    maxAmount = 3,
    collectionTime = 5000
}

-- NEW: Packaging configuration
Config.MeatPackaging = {
    minAmount = 1,        -- Minimum amount to package at once
    maxAmount = 5,        -- Maximum amount to package at once
    enableVariableAmount = true  -- Set to false to disable variable amounts and only package one.
}

Config.MeatTypes = {
    chicken = {
        rawItem = "raw_chicken",
        cutItem = "cut_chicken",
        packagedItem = "packaged_chicken",
        washTime = 3000,
        cutTime = 5000,
        packageTime = 4000,
        weight = 30     -- The weight is the chance of selection. Increase the weight for higher collection chance.
    },
    beef = {
        rawItem = "raw_beef",
        cutItem = "cut_beef",
        packagedItem = "packaged_beef",
        washTime = 3000,
        cutTime = 7000,
        packageTime = 5000,
        weight = 25
    },
    pork = {
        rawItem = "raw_pork",
        cutItem = "cut_pork",
        packagedItem = "packaged_pork",
        washTime = 3000,
        cutTime = 6000,
        packageTime = 4500,
        weight = 25
    },
    lamb = {
        rawItem = "raw_lamb",
        cutItem = "cut_lamb",
        packagedItem = "packaged_lamb",
        washTime = 3000,
        cutTime = 6500,
        packageTime = 4500,
        weight = 15
    },
    turkey = {
        rawItem = "raw_turkey",
        cutItem = "cut_turkey",
        packagedItem = "packaged_turkey",
        washTime = 3000,
        cutTime = 8000,
        packageTime = 6000,
        weight = 5
    }
}

Config.Animations = {
    wash = {
        dict = "mp_safehouseshower@male@",
        anim = "male_shower_idle_b"
    },
    cut = {
        dict = "anim@amb@business@coc@coc_unpack_cut@",
        anim = "coc_unpack_cut_v1_coccutter",
        prop = `prop_knife`
    },
    package = {
        dict = "anim@amb@business@coc@coc_unpack_cut@",
        anim = "coc_unpack_cut_v4_coccutter"
    },
    give = {
        dict = "mp_common",
        anim = "givetake1_a"
    },
    collect = {
        dict = "anim@amb@business@coc@coc_unpack_cut@",
        anim = "coc_unpack_cut_v1_coccutter"
    }
}

Config.Delivery = {
    requiredPackages = 5,
    minReward = 200,
    maxReward = 500,
    vehicleDespawnDelay = 30000,
    continueDeliveries = true,
    locationCooldownTime = 300000,
}

Config.DeliveryLocations = {
    vector3(1163.37, -323.8, 69.21), -- Mirror Park
    vector3(-1223.78, -906.92, 12.33), -- Vespucci Beach
    vector3(-47.52, -1757.51, 29.42), -- Davis
    vector3(373.88, 325.7, 103.57), -- Vinewood Hills
    vector3(150.26, 6648.37, 32.04), -- Paleto Bay
    vector3(-3241.93, 1001.46, 12.83), -- Chumash
    vector3(2557.26, 382.18, 108.62), -- Tataviam Mountains
    vector3(1961.91, 3740.5, 32.34), -- Sandy Shores
    vector3(1392.68, 3606.45, 34.98), -- Sandy Shores Airfield
    vector3(-1487.55, -379.11, 40.16), -- Morningwood
    vector3(-2968.24, 390.91, 15.04), -- Banham Canyon
    vector3(-1820.52, 794.5, 138.09), -- Richman
    vector3(-1305.12, -834.59, 17.15), -- Little Seoul
    vector3(114.54, -1968.11, 20.75), -- South Los Santos
    vector3(1136.42, -982.24, 46.42), -- El Rancho
}

Previoustxgls-butcherjobNextox_inventory

Last updated 7 days ago

🍖