Config

This is how the configuration file for our craftingsystem looks

Config = {
    Framework = 'esx', -- esx or qb-core
    OpenType = 'ox-target', -- ox-target, qb-target, qb-textui, esx-textui, okokTextUI, helpNotification
    TextLabel = 'Crafting', -- This is the text that will be shown when you are close to a crafting location

    CraftingSettings = {
        maxDistance = 10.0, -- The max distance you can be from the crafting location while crafting
        maxCrafts = 5, -- The max amount of crafts you can do at the same time
    },

    CraftingLocations = {
        {
            positions = {
                text = vector3(1189.0679931640625, 2636.565673828125, 38.40191650390625),
                entity = vector3(1189.671630859375, 2636.49267578125, 38.45011520385742),
            },

            requirements = {
                job = false,
                names = {'police'}
            },

            crafts = {
                'pistol',
                'knife',
                'shotgun',
                'ak47'
            }
        }
    },

    Crafts = {
        ['pistol'] = {
            item = 'WEAPON_PISTOL',
            label = 'Glock 17',
            model = 'w_pi_pistol',
            image = 'https://cdn.discordapp.com/attachments/836701714262130740/999325105102528573/WEAPON_COMBATPISTOL_1.png',

            timeToCraft = 25,
            recivedXp = 35,
            levelNeeded = 5,

            recipe = {
                { label = 'Aluminum', item = 'aluminum', amount = 6},
            },
        },

        ['knife'] = {
            item = 'WEAPON_KNIFE',
            label = 'Knife',
            model = 'w_me_knife_01',
            image = 'https://cdn.discordapp.com/attachments/836701714262130740/929080275344969788/WEAPON_KNIFE.png',

            timeToCraft = 10,
            recivedXp = 25,
            levelNeeded = 1,

            recipe = {
                { label = 'Aluminum', item = 'aluminum', amount = 1},
            },
        },

        ['shotgun'] = {
            item = 'shotgun',
            label = 'Shotgun',
            model = 'w_sg_pumpshotgun',
            image = 'https://cdn.discordapp.com/attachments/836701714262130740/929072337419124746/WEAPON_PUMPSHOTGUN.png',

            timeToCraft = 20,
            recivedXp = 25,
            levelNeeded = 10,

            recipe = {
                { label = 'Aluminum', item = 'aluminum', amount = 10},
            },
        },

        ['ak47'] = {
            item = 'WEAPON_ASSAULTRIFLE',
            label = 'AK-47',
            model = 'w_ar_assaultrifle',
            image = 'https://cdn.discordapp.com/attachments/836701714262130740/929072332708921415/WEAPON_ASSAULTRIFLE.png',

            timeToCraft = 20,
            recivedXp = 30,
            levelNeeded = 15,

            recipe = {
                { label = 'Aluminum', item = 'aluminum', amount = 15},
            },
        }
    }
}

Last updated