config.lua

Full View

Config = {}

-- Choose your framework: 'esx' or 'qbcore'
Config.Framework = 'esx'

-- Interaction type: '3dtext', 'ox_target', 'qb_target'
Config.InteractionType = '3dtext'

-- The prop model used to visually represent the Craftcoin machine
-- This should be a valid GTA object model name
Config.MachineProp = "prop_byard_machine02"

-- The item name that represents CraftCoins in the inventory
Config.CraftCoinsItem = "craftcoin"

-- Time in seconds between each processing attempt per player
-- Example: 60 seconds = 1 minute, 600 seconds = 10 minutes
Config.Cooldown = 60

-- Maximum number of items processed in one batch (per cooldown cycle)
Config.BatchSize = 2

-- The maximum distance (in meters) a player can be from the machine to interact with it
Config.InteractDistance = 3.0

-- Define which items are accepted by the machine and their associated rarity
-- Only these items will be processed and rewarded
Config.AcceptedItems = {
    ["fabric"] = { rarity = "common" },
    ["scrapmetal"] = { rarity = "rare" },
    ["WEAPON_CROWBAR"] = { rarity = "epic" },
}

-- The coin reward multiplier based on item rarity
-- The formula: reward = rarityValue * number of items processed
Config.RarityValues = {
    common = 1,  -- basic materials
    rare = 3,    -- mid-tier items
    epic = 5,    -- high-value items
}

-- Machine positions (can define multiple machines here)
Config.MachinesBlip = true
Config.MachinesBlipIcon = 434
Config.MachinesBlipColor = 46
-- Key: machine ID, Value: 3D world coordinates where the machine exists
Config.Machines = {
    ["remelter_1"] = vector4(1676.6160, 3267.6963, 41.0267, 90.0),
    ["remelter_2"] = vector4(1687.3052, 3267.0088, 40.8709, 180.0),
}

-- Display name (label) of the stash, shown in the inventory UI
Config.StashLabel = "Craftcoin Machine - Loading Stash"

-- Number of inventory slots available in the machine's stash
Config.StashSlots = 10

-- Maximum weight allowed in the stash (in grams). Example: 100000 = 100 kg
Config.StashWeight = 100000

Config.Locales = {
    ['blip_name'] = 'CraftCoin Machine',
    ['open_menu_label'] = '💰 Craftcoin Machine',
    ['open_stash_title'] = '🔧 Open Input Stash',
    ['open_stash_description'] = 'Deposit materials in exchange for Craftcoins.',
    ['withdraw_title'] = '💰 Withdraw Craftcoins',
    ['withdraw_description'] = 'Available amount: %s',
    ['withdraw_input_label'] = 'How many Craftcoins would you like to withdraw?',
    ['withdraw_invalid_amount'] = 'Invalid amount!',
    ['identifier_missing'] = 'Error: Identifier not available!',
    ['3dtext_prompt'] = '[E] %s',
    ['target_label'] = 'Open Craftcoin Machine',
    ['withdraw_success'] = 'You have withdrawn %s Craftcoins.',
    ['withdraw_failed'] = "You don't have enough Craftcoin balance.",
    ['item_not_allowed'] = "You can't put this item in here: %s",
    ['machine_empty'] = 'The machine has finished processing and is now empty.',
}

Last updated