RM-ScriptsRM-SCRIPTS
Recycler

Configuration

Full configuration reference for rm-recycling.

Configuration

Client config (config.lua)

Config = {}

-- Sound options for recycler (xsound)
Config.Sound = {
    enabled = true,       -- Set to false to disable recycler sound
    file = 'https://r2.fivemanage.com/aKdhnWQAzohu8VO3pwbkC/recycling.mp3',
    volume = 0.5,         -- 0.0 to 1.0
    distance = 10.0,      -- Max distance sound can be heard
    duration = 5850,      -- Restart interval in ms (set slightly below clip length)
}

Config.Locale = 'en'            -- Locale file to use (e.g. 'en', 'de')
Config.Target = 'ox_target'     -- 'ox_target' or 'qb-target'
Config.Framework = 'qbox'       -- 'qbox' or 'qbcore'
Config.Inventory = 'ox_inventory'

Config.Debug = false

Config.RecyclerLocations = {
    -- Prop-based recycler (spawns machine prop, targets the prop)
    -- ['recycler1'] = {
    --     label = 'Recycler Area 1',
    --     icon = 'fa-solid fa-fire',
    --     prop = {
    --         modelOff = 'bzzz_prop_recycler_b',  -- Offline/idle machine
    --         modelOn  = 'bzzz_prop_recycler_a',  -- Active recycling (animated)
    --         coords = vector4(-435.08, -1727.17, 18.21, 340.40),
    --         radius = 5.0,
    --     },
    --     blip = {
    --         enabled = true,
    --         sprite = 527,
    --         scale = 0.75,
    --         color = 35,
    --         name = 'Recycler',
    --     }
    -- },

    -- Coords-only recycler (no prop — targets a sphere zone at coords)
    ['recycler3'] = {
        label = 'Recycler Area 3',
        icon = 'fa-solid fa-recycle',
        coords = vector3(-427.455, -1723.371, 19.206),
        radius = 2.5,
        blip = {
            enabled = true,
            sprite = 527,
            scale = 0.75,
            color = 35,
            name = 'Recycler',
        }
    },
}

-- Recycling recipes
Config.RecyclingItems = {
    [1] = {
        durationPer = 2000,                         -- ms per item
        required = { item = 'radio', count = 1 },
        result = {
            { item = 'scrapmetal', count = 1 },
        },
    },
    [2] = {
        durationPer = 2000,
        required = { item = 'lockpick', count = 1 },
        result = {
            { item = 'scrapmetal', count = 1 },
        },
    },
}

return Config

Sound options

KeyTypeDescription
enabledbooleanEnable/disable recycler audio
filestringPublicly accessible MP3 URL
volumenumberVolume level 0.01.0
distancenumberMax distance the sound can be heard
durationnumberLoop restart interval in ms (set slightly below clip length)

Location types

TypeHow it works
Prop-basedSpawns modelOff/modelOn props at coords, targets the prop
Coords-onlyNo prop — creates a sphere zone at coords with the given radius

Recipe options

KeyTypeDescription
durationPernumberProcessing time per item in ms
required.itemstringox_inventory item name to consume
required.countnumberAmount consumed per run
resulttableList of { item, count } outputs

Server config (sv_config.lua)

SvConfig = {}

SvConfig.Discord = {
    enabled = true,
    serverName = 'My Server',

    -- Fires when a player adds or grabs items from the input slots
    webhookInput = '',

    -- Fires when the machine finishes recycling an item (input → output)
    webhookRecycled = '',

    -- Fires when a player claims items from the output slots
    webhookItemClaimed = '',

    -- Fires when a player closes the recycler (full session summary)
    webhookSession = '',
}
KeyDescription
enabledEnable/disable all Discord logging
serverNameShown in embed footers
webhookInputLogs input slot changes
webhookRecycledLogs completed recycles
webhookItemClaimedLogs claimed output items
webhookSessionLogs full session summary on close

Leave any webhook URL empty to disable that specific log.