Skip to content

A FiveM - QBCore resource that adds working vending machines to your server.

License

Notifications You must be signed in to change notification settings

sSisiTech/ss-vending

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ss-vending

A FiveM - QBCore resource that adds working vending machines to your server.

Requirements

Installation

  • Download ss-vending
  • Extract the ss-vending-main folder inside your resources folder
  • remove -main from ss-vending-main
  • add ensure ss-vending to your server.cfg

Configuration

The script is very easy to modify and requires 0 coding knowledge.

Adding products

You can configure your products in the config.lua at Config.Products.

you can add a new product like this:

Cola = {name = 'Cola', price = 2, itemname = 'kurkakola'},

Options

  • name (name of the product)
  • price (price of the product)
  • itemname (name of item that the player gets when buying the product, can be found at qb-core/shared/items.lua
  • icon [OPTIONAL] (the icon shown in the ox_target menu, example: fa-solid fa-mug-saucer) (Icons can be found here)
  • amount [OPTIONAL] (the amount of items you get from ONE purshase)

Adding Vendings

You can configure your vendings in the config.lua at Config.Vendings.

you can add a new vending like this:

    Cola = {
        modelhash = '992069095',
        modelname = 'prop_vend_soda_01',
        products = {
            'Cola',
            'Sprunk',
        }
    },

Options

  • modelhash (the hash value of model) (find here)
  • modelname (the name of the model) (find here)
  • products (a list of the products sold in this vending machine) (product names should be in ' ' and seperated by ,)

NOTE: the list of products do not contain the name values of the products but the actual name in the Confg (shown in bold below):

Cola = {name = 'Cola', price = 2, itemname = 'kurkakola'}

Optional:
  • animDict (value can be found here)
  • anim (value can be found here)
  • flags
  • duration (duration of the progressbar)
  • distance (minimum distance to be able to interact with the vending)

Complete Example

You can add as many vending machines and products as you want, and you are not limited to jsut vending machines.

to show that I will add a newspaper "vending machine".

We will be using this model:

Screenshot 2024-01-12 at 11-35-27 Search news GTA V object model IDs with images

Config.Products

I chose to charge $1 for the newspaper, usually these are free.

Newspaper = {name = 'Newspaper', price = 1, itemname = 'newspaper', icon = 'fa-solid fa-newspaper'},

Config.Vendings

I have not added in the animation because I couldn't find an animation for this.

    Newspaper = {
        modelhash = '261193082',
        modelname = 'prop_news_disp_02e',
        animDict = '',
        anim = '',
        products = {
            'Newspaper',
        }
    },

About

A FiveM - QBCore resource that adds working vending machines to your server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages