Lusty94
Tebex StoreSupport DiscordGitHubCFX Profile
  • 👋 Lusty94 Scripts
  • 💵Store Discounts
  • 📥 Script Installation
  • 🤝Supported Scripts
  • 📜Paid Resouces
    • 🍻Bars
      • 🔧Changelogs
      • 💼 Jobs
      • 📦Stashes
      • 👁️Blips
      • 🧩Props
      • 👆Interaction Locations
      • 📸CCTV
      • 🍳Recipes
      • 📬Supplies
      • 🥦Ingredients
    • 🍁Weed Shops
      • 🔧Changelogs
      • 💼 Jobs
      • 📦Stashes
      • 👁️Blips
      • 🧩Props
      • 👆Interaction Locations
      • 🍃Picking
      • 📸CCTV
      • 🍳Recipes
      • 📬Supplies
      • 🥦Ingredients
      • 🚬Consumables
    • 💲Money Wash
    • 💰Pawn Shop
      • 🔧Changelogs
      • 🛒Pawnshop Locations
    • 📲Drug Sales
      • 🔧Changelogs
      • 📲Selling
      • 💻Default Configuration
    • 🚗Chop Shop
      • 🔧Changelogs
      • 📅SQL
      • 🗣️Commands
      • 📋Reputation
      • 💰Selling
      • 🚗Chop Shops
      • 💻Default Configuration
    • 🚘Vehicle Shop
      • 🔧Changelogs
      • 📅SQL
      • 🗣️Commands
      • 📥Database
      • 🚘Vehicle Shops
      • 💻Default Configuration
    • 🚗Rental
    • 🚙Towing
    • 🍲Restaurants
    • 💊Drugs
    • 🍁Weed
  • 📜Free Resources
    • 🛒Shops
      • 🔧Changelogs
      • 🛒Adding Shops
      • 🪛Configuration
    • 🖥️Boss Menu
      • 🔧Changelogs
      • 💻Adding Job Locations
    • ✅Green Zones
      • 🔧Changelogs
      • 📌Adding Zones
Powered by GitBook
On this page
  1. Free Resources
  2. Shops

Adding Shops

IMPORTANT INFORMATION

  • The key (shop name) must match the shopType args you pass in the info table

['My Cool Shop'] = { -- the key is the shop name
    info = {
        shopLabel = 'My Cool Shop', -- label used as the shop header
        targetIcon = 'fa-solid fa-hand-point-up', -- icon used for target interaction
        targetLabel = 'Open Shop', -- label used for target interaction
        distance = 2.0, -- max distance for target interaction
        scenario = 'WORLD_HUMAN_CLIPBOARD', -- name of scenario used set to nil for nothing
        args = { shopType = "My Cool Shop" }, -- args sends the shopType data to the event to determine which inventory shop to open and displays the relevant products available - this must be the same as the key name
    },
    blips = { -- blip settings for shop
        enabled = true, -- blip enabled
        id = 52, -- blip id
        colour = 2, -- blip colour
        scale = 0.6, -- bliip scale
        title = 'My Cool Shop', -- blip title
    },
    models = { -- define random ped models below
        'mp_m_securoguard_01',
    },
    locations = { -- define spawn locations for the vendor must be vector4
        vector4(1777.59, 2560.52, 45.62, 187.83),
    },
    inventory = {
        -- define items and their prices below that can be purchased at this particular vendor - ensure these are in your items.lua!
        { name = 'my_cool_item',     price = 4, amount = 50 },
        { name = 'my_cool_item_that_requires_a_job',   price = 0, amount = 1,  requiresJob = {'police', 'bsco', 'leo',}, },
        { name = 'my_cool_item_that_requires_a_job_&_rank',         price = 0, amount = 50, requiresJob = {'police', 'bsco', 'leo',}, requiresRank = 1, },
        { name = 'my_cool_item_that_requires_a_license',         price = 0, amount = 50, requiresLicense = 'weapon', },
    },
},

Info

  • shopLabel is the label displayed in the shop menu header

  • targetIcon is the icon used when targeting the ped

  • targetLabel is the label displayed when targeting the ped

  • distance is the maximum distance permitted to target the ped make sure this is below the number you set in Config.CoreSettings.Security.maxDistance to prevent clashes with the security checks and cause unnecessary issues

  • scenario is the scenario animation used for the ped (set to nil for no animation)

  • args sends the shopType data which determines the inventory this must match the key name of the shop

info = {
    shopLabel = 'My Cool Shop', -- label used as the shop header when opening the inventory shop
    targetIcon = 'fa-solid fa-hand-point-up', -- icon used for target interaction
    targetLabel = 'Open Shop', -- label used for target interaction
    distance = 2.0, -- max distance for target interaction
    scenario = 'WORLD_HUMAN_CLIPBOARD', -- scenario used for ped
    args = { shopType = "My Cool Shop" }, -- args sends the shopType data to the event to determine which inventory shop to open and displays the relevant products available - this must be the same as the key name
},

Blips

  • enable specific blips by setting 'enabled' to true

  • id is the id of the blip you want to be displayed for that shop

  • colour is the id of the colour you want to be displayed for that shop

  • scale is the size of the blip on your map

  • title is the name of the blip on your map

blips = { -- blip settings for shop
    enabled = true, -- blip enabled
    id = 52, -- blip id
    colour = 2, -- blip colour
    scale = 0.6, -- bliip scale
    title = 'Supermarket', -- blip title
},

Models

  • You can use a single ped model or you can use multiple

  • if using multiple peds it will randomly pick a ped for each store from the models you define

models = { -- define random ped models below
    'mp_m_shopkeep_01',
    'a_m_y_beachvesp_01',
},

Locations

  • You can set multiple locations or single ones for each shop

  • The locations must be a vector4 to function correctly

locations = { -- define spawn locations for the vendor must be vector4
    vector4(24.47, -1346.62, 29.5, 271.66),
    vector4(-3039.54, 584.38, 7.91, 17.27),
    vector4(-3242.97, 1000.01, 12.83, 357.57),
    vector4(1728.07, 6415.63, 35.04, 242.95),
    vector4(1959.82, 3740.48, 32.34, 301.57),
    vector4(549.13, 2670.85, 42.16, 99.39),
    vector4(2677.47, 3279.76, 55.24, 335.08),
    vector4(2556.66, 380.84, 108.62, 356.67),
    vector4(372.66, 326.98, 103.57, 253.73),
},

Inventory

  • Here you can define what items can be purchased at this particular shop

  • You can also add restrictions to items which is covered in more detail below

  • name is the item name - ensure this is in your items.lua!

  • price is the cost of that particular item

  • amount is the maximum amount players can purchase at once

  • for weapons it is advised to only stock 1 of that item to ensure there is no issues with serial number generation from your inventory script

inventory = { 
    -- define items and their prices below that can be purchased at this particular vendor - ensure these are in your items.lua!
    { name = 'tosti',         price = 2,   amount = 50 },
    { name = 'water_bottle',  price = 2,   amount = 50 },
    { name = 'kurkakola',     price = 2,   amount = 50 },
    { name = 'twerks_candy',  price = 2,   amount = 50 },
    { name = 'snikkel_candy', price = 2,   amount = 50 },
    { name = 'sandwich',      price = 2,   amount = 50 },
    { name = 'lighter',       price = 2,   amount = 50 },
},

Restrictions

  • You can set restrictions for job, job rank and license for items

  • To set job requirements you can use a table of jobs allowing multiple jobs to access that shop or you can use a single string allowing just a single job to access that shop

requiresJob = {'my_cool_job_name', 'my_other_cool_job_name', },


requiresJob = 'my_cool_job_name',
{ name = 'weapon_nightstick',   price = 0, amount = 1,  requiresJob = {'police', 'bsco', 'leo',}, },

  • You can set job rank restrictions for certain items, the police armory is a good example of this for things such as higher powered weaponry, this could be rank locked to higher level police officers

  • You can not pass just the job rank on its own, you must also define the jobs that can access the store in the first place using requiresJob

requiresRank = 1,
{ name = 'pistol_ammo',         price = 0, amount = 50, requiresJob = {'police', 'bsco', 'leo',}, requiresRank = 1, },

  • You can set license restrictions for items such as weapons that require a 'weapons' license just make sure your license type you set is a valid license in your server and is able to be granted to players

requiresLicense = 'my_cool_license_name',
{ name = 'pistol_ammo',         price = 0, amount = 50, requiresLicense = 'weapon', },

Last updated 2 months ago

Blip information can be found here:

Ped models can be found here:

https://docs.fivem.net/docs/game-references/blips/
https://docs.fivem.net/docs/game-references/ped-models/
📜
🛒
🛒
Page cover image