Page cover

πŸ’²Selling

  • Player can sell the various items they brew for cash

  • The coords for the ped must be vector4

  • Define the sale chance for a successful sale

  • Define the time in minutes players must wait before being able to sell again if recently rejected

  • Define blip settings if enabled

  • Define multiple categories and sellable items in the Selling table the first key is the category name the second key is the sellable item name

  • Define the minimum and maximum values for the item sold


Config.Selling = {-- define items that can be sold at the selling ped
    Ped = {
        model = 's_m_y_dockwork_01', -- ped model
        coords =  vector4(45.86, 3704.02, 39.76, 325.26), -- ped spawn coords  must be vector4 (this is also used as the blip coordinates if enabled below) 
        icon = 'fa-solid fa-money-bill', -- target icon
        label = 'Sell Alocohol', -- target label
        distance = 3.0, -- target distance
        saleChance = 75, -- percentage of successful sale
        returnTime = 10, -- time in minutes before players can try to sell again if a sale was recently rejected
    },
    blip = { -- define blip settings
        enabled = true, -- enable blip for this location
        id = 605, -- blip id
        colour = 5, -- blip colour
        scale = 0.7, -- blip scale
        title = 'Sell Alocohol', -- blip title
    },
    Selling = {-- define item categories and items that can be sold at the selling ped
        ['Moonshine'] = { -- the key is the category name
            ['moonshine'] = { -- the key is the item name that can be sold
                value = { -- define the items min and max values PER UNIT (this is multiplied by the amount the player has on them)
                    min = 25, -- minimum value
                    max = 50, -- maximum value
                },
            },
            --add more sellable items below
        },
        ['Vodka'] = { -- the key is the category name
            ['potatovodka'] = { -- the key is the item name that can be sold
                value = { -- define the items min and max values PER UNIT (this is multiplied by the amount the player has on them)
                    min = 25, -- minimum value
                    max = 50
                },
            },
            --add more sellable items below
        },
        --add more sale categories below 
    },
}

Last updated