STG ScriptsDocumentation
Butcher

Configuration

Every option in STG Butcher config.lua, from the framework and language to the farm, price, deposit, work vehicle, factory stations, return points and blips.

All settings live in stg_butcher/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

Framework

STG.Framework = "auto"

Prop

Type

The getFramework function at the bottom of the file reads this value. You do not need to edit it.

Language

STG.Locales = {}
STG.Language = 'en'

Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, he, fi, no, cs. These cover the notifications and the "Press E to ..." prompts. To change a text, edit the matching file in stg_butcher/locales/. Leave the STG.Locales = {} line as it is, the locale files fill it.

The "Remove Feathers" title on the plucking screen is not part of the locale files. Edit it in stg_butcher/html/index.html. The blip names are set in Blips.

Farm

STG.chickenSpawn = vector3(2113.79, 5024.14, 40.84)
STG.chickenDistance = 10.0
STG.maxChicken = 9

Prop

Type

The hens appear when a player comes within 25 metres of chickenSpawn and are removed when the player walks away, so a new flock is waiting on the next visit. The vehicle always holds up to 10 chickens. maxChicken does not change that limit.

Price and deposit

STG.price = 500
STG.deposit = 1000

Prop

Type

The deposit is paid in cash. A player without enough cash cannot rent the vehicle. If the player disconnects before returning it, the deposit is not refunded.

Work vehicle

STG.VehicleModel = "kalahari"

function giveKey(vehicle)
    local plate = GetVehicleNumberPlateText(vehicle)

    if GetResourceState('qb-vehiclekeys') == 'started' then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    else
        -- your code
    end
end
  • VehicleModel: spawn name of the vehicle the farmer rents out. The chickens are attached to the back of the vehicle, so pick a pickup with an open bed.
  • giveKey: runs on the player's side right after the vehicle spawns. It gives the keys through qb-vehiclekeys when that resource is started. If you use another key system, add its client code in the else branch. The vehicle argument is the spawned vehicle.

Help text and notifications

STG.UseCustomHelpNotify = true

STG.Functions = {
    ["HelpNotify"] = function(message)
        lib.showTextUI(message, { ... })
    end,

    ["HideHelpNotify"] = function()
        lib.hideTextUI()
    end,

    ["Notify"] = function(message)
        lib.notify({
            title = getMessage('notify_title'),
            description = message,
            type = "info"
        })
    end
}
  • UseCustomHelpNotify: when true, the "Press E to ..." prompts go through HelpNotify and HideHelpNotify. Keep it on true and change the two functions if you want another text UI. When false, the script falls back to the GTA help text, which the current version only flashes for a moment, so true is the setting to use.
  • HelpNotify: shows a prompt. The default uses the ox_lib text UI.
  • HideHelpNotify: hides the prompt again.
  • Notify: every notification of the script goes through this function, for example the sale and the deposit refund. Replace the body to use your own notification system.

Burger shop

STG.sellChicken = {
    model = "u_m_y_burgerdrug_01",
    coord = vector4(132.67, -1462.16, 28.34, 45.35)
}

Prop

Type

Factory stations

STG.coords = {
    ["chickenKill"] = vector3(-88.93, 6236.13, 31.08),
    ["pluckFeather"] = vector3(-78.06, 6229.45, 31.08),
    ["chickenCut"] = vector3(-99.58, 6210.56, 31.01),
    ["chickenPackage"] = vector3(-103.76, 6206.34, 31.015),
    ["sellChicken"] = vector3(132.67, -1462.16, 29.34)
}

Each station shows an icon from 15 metres away and is used by pressing E within 3 metres.

Prop

Type

Players take the chickens out of the vehicle one at a time. This works when they are on foot, next to the vehicle and within 75 metres of chickenKill, so park close to the factory.

Vehicle rental

STG.carDealerNpc = {
    coord = vector4(2099.47, 5017.13, 40.36, 314.64),
    model = "a_m_m_farmer_01",
    spawnPoint = vector4(2095.66, 5023.43, 40.80, 314.64)
}

Prop

Type

Players need a rented vehicle before they can pick up a chicken. Returning the vehicle at the farmer also clears any chickens still in the back.

Return points

STG.returnPoints = {
    vector4(-79.1125, 6269.0947, 31.3761, 313.5428),
    vector4(131.0993, -1463.8910, 29.3570, 51.8532)
}

Extra places where players can hand the vehicle back and get the deposit, without driving back to the farm. The defaults sit next to the factory and next to the burger shop. Each entry is the position and heading of a gardener ped, and players press E within 2 metres. The vehicle cannot be rented here, and it cannot be returned while chickens are still in the back. Set the list to {} to remove the return points.

Blips

STG.blips = {
    [1] = {
        label = "[Butcher] Chicken Area",
        coord = STG.chickenSpawn,
        sprite = 238,
        scale = 0.7,
        color = 5,
        visible = true
    },
    -- [2] Sell, [3] Factory
}

The script ships with three blips: the chicken area, the burger shop and the factory. Each entry is one blip, and you can add more.

Prop

Type

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page