Page cover

☘️Plants

  • You can add more harvestable plants by defining the item name and its relevant information in the Config.Plants table

  • The key is the harvested item name

Config.Plants = {
    ['item_name_rewarded'] = { -- the key is the item name given from harvesting
        ---
    },
}

  • Icon is the target icon for the prop

  • Label is the target label for the prop

  • Distance is the target distance for the prop bare in mind the number you set for MaxDistance in Security settings

info = {
    icon = 'fa-solid fa-hand-point-up', -- target icon
    label = 'Harvest Item', -- target label
    distance = 3.0, -- target distance
},

  • Name is the prop model you want to use for this item

prop = {
    name = 'prop_bzzz_gardenpack_barley001', -- prop name
},

  • You can set the prop to have a required item to harvest

  • Set enabled to true to use a required item

  • Name is the item name

item = {
    required = true, -- enable a required item to harvest
    name = 'scythe', -- item name
},

Blip information can be found here: https://docs.fivem.net/docs/game-references/blips/

  • You can enable blips for each prop that spawns

  • Set enabled to true to use blips

  • Define the blip id

  • Define the blip colour

  • Define the blip scale

  • Define the blip title

blip = { -- define blip settings
    enabled = true, -- enable blip for this location
    id = 836, -- blip id
    colour = 47, -- blip colour
    scale = 0.7, -- blip scale
    title = 'Harvestable Item', -- blip title
},

  • Define progressCircle settings for harvesting

  • Duration is the time to harvest

  • Label is the progressCircle label

  • animation table - anim is animation name, dict is animation dictionary name, flag is animation flag

  • prop table - model is prop name, bone is bone index for prop, pos is prop position, rot is prop rotation

progress = {
    duration = 10000, -- duration
    label = 'Harvesting Item', -- label
    anim = { -- define animation settings
        anim = 'bzzz_cutting_sickle', -- animation name
        dict = 'bzzz_cutting_sickle', -- animation dict name
        flag = 49, -- flag number
    },
    prop = {
        model = 'bzzz_prop_sickle_a', -- prop model
        bone = 57005, -- bone index
        pos = vec3(0.1, 0.03, -0.01), -- prop position
        rot = vec3(-123.0, -52.0, -36.0), -- prop rotation
    },
},

  • Define coordinates for the props to spawn at these must be vector4

coords = { -- object spawn coords must be vector4
    vector4(5383.43, -5217.29, 32.62, 0.0),
    vector4(5386.36, -5219.45, 33.04, 0.0),
    vector4(5389.52, -5221.68, 33.46, 0.0),
    --add more locations as required
},

  • This is an example of a finished config for a harvestable item

Config.Plants = {
    ['barley'] = { -- the key is the item name given from harvesting
        info = {
            icon = 'fa-solid fa-hand-point-up', -- target icon
            label = 'Harvest Barley', -- target label
            distance = 3.0, -- target distance
        },
        prop = {
            name = 'prop_bzzz_gardenpack_barley001', -- prop name
        },
        item = {
            required = true, -- enable a required item to harvest
            name = 'scythe', -- item name
        },
        blip = { -- define blip settings
            enabled = true, -- enable blip for this location
            id = 858, -- blip id
            colour = 10, -- blip colour
            scale = 0.7, -- blip scale
            title = 'Barley Plants', -- blip title
        },
        progress = {
            duration = 10000, -- duration
            label = 'Harvesting barley', -- label
            anim = { -- define animation settings
                anim = 'bzzz_cutting_sickle', -- animation name
                dict = 'bzzz_cutting_sickle', -- animation dict name
                flag = 49, -- flag number
            },
            prop = {
                model = 'bzzz_prop_sickle_a', -- prop model
                bone = 57005, -- bone index
                pos = vec3(0.1, 0.03, -0.01), -- prop position
                rot = vec3(-123.0, -52.0, -36.0), -- prop rotation
            },
        },
        coords = { -- object spawn coords must be vector4
            vector4(5383.43, -5217.29, 32.62, 0.0),
            vector4(5386.36, -5219.45, 33.04, 0.0),
            vector4(5389.52, -5221.68, 33.46, 0.0),
            vector4(5392.73, -5224.16, 33.85, 0.0),
            vector4(5395.68, -5226.40, 34.18, 0.0),
            vector4(5398.75, -5228.67, 34.52, 0.0),
            vector4(5401.76, -5231.05, 34.80, 0.0),
            vector4(5404.73, -5233.34, 35.00, 0.0),
            vector4(5407.82, -5235.64, 35.07, 0.0),
            vector4(5410.38, -5237.50, 35.19, 0.0),
            vector4(5413.23, -5233.79, 35.26, 0.0),
            vector4(5410.74, -5232.12, 35.17, 0.0),
            vector4(5407.81, -5229.82, 35.08, 0.0),
            vector4(5404.78, -5227.40, 34.88, 0.0),
            vector4(5402.10, -5225.15, 34.61, 0.0),
            vector4(5399.13, -5222.73, 34.29, 0.0),
            vector4(5396.21, -5220.75, 34.00, 0.0),
            vector4(5392.52, -5218.15, 33.59, 0.0),
            vector4(5389.50, -5215.78, 33.16, 0.0),
            vector4(5386.67, -5213.67, 32.71, 0.0),
            --add more locations as required
        },
    },
    --add more harvestable plants as required below
}

Last updated