JixelPatterns
  • JixelPatterns Documentation
  • Troubleshooting
    • Common Issues
    • Setting Up Locations
    • FAQ
  • Dependency
    • Jim_Bridge
      • Animal Ped Support
      • Script Helpers
      • Loader Functions
      • Callbacks
      • Cameras
      • Context Menus
      • Crafting
      • DrawText
      • Dui Functions
      • Input Creator
      • Inventories
      • Job Functions
      • Make Functions
      • Meta Handlers
      • Notifications
      • Phones
      • Player Functions
      • Poly Zones
      • Progress Bars
      • Scale Entity
      • Shops
      • Skillcheck
      • Society Banking
      • Stash Control
      • Targets
      • Vehicles
      • Wrapper Functions
      • Scaleforms
  • Paid Assets
    • Jim-Mechanic
      • Common Issues
      • Installation
      • Locations
        • Creating a Location
      • Nitrous
      • Harness + Seatbelt
      • Emergency Repair Bench
      • Odometer
      • Speedometer
      • Performance Mods
      • Preview System
      • Repair System
      • Car Lifts
      • Plate Change
      • Push Vehicle
      • Stancer Kit
      • Vehicle Seat Picker
    • Jim-Bakery
      • Installation
    • Jim-BeanMachine
      • Installation
    • Jim-BurgerShot
      • Installation
    • Jim-CatCafe
      • Installation
    • Jim-Henhouse
      • Installation
    • Jim-PizzaThis
      • Installation
    • Jim-Popsdiner
      • Installation
  • Free Assets
    • Jim-Mining
      • Installation
      • How To Use
        • Mining
        • Stone Washing
        • Gold Panning
    • Jim-Recycle
      • Installation
      • How To Use
        • Recycling
        • Dumpster Diving
        • Scrapping
    • Jim-Payments
      • Installation
      • How To Use
    • Jim-Shops
      • Installation
      • How To Use
    • Jim-Boarding
      • Installation
      • How To Use
    • Jim-Trains
      • Installation
      • How To Use
    • Jim-Consumbles
      • Installation
      • How To Use
    • Jim-DJBooth
      • Installation
      • How To Use
    • Jim-JobGarage
      • Installation
      • How To Use
    • Jim-Chairs
      • Installation
    • Jim-Notepad
      • Installation
      • How To Use
Powered by GitBook
On this page
  • shops.lua
  • sellMenu(data)
  • sellAnim(data)
  • openShop(data)
  • registerShop(name, label, items, society)
  1. Dependency
  2. Jim_Bridge

Shops

shops.lua

This module provides functions to open, sell to, and register in-game shops and markets.

sellMenu(data)

Opens a UI menu for selling items to a vendor or market system.

A simple system for the ability to sell all of an item in a players inventory

Good for money making eg. pawn shops

Example:

sellMenu({
    sellTable = {
        Header = "Sell Items",
        Items = {
            ["gold_ring"] = 100,
            ["diamond"] = 500,
        },
    },
    ped = pedEntity,
    onBack = function() print("Returning to previous menu") end,
})

sellAnim(data)

Plays an animation during the selling process for immersion.

Used in sellMenu, but can be called externally if needed

Example:

sellAnim({
   item = "gold_ring",
   price = 100,
   ped = pedEntity,
   onBack = function() print("Sold Items") end,
)

openShop(data)

Opens a shop interface for purchasing items.

Checks job/gang restrictions, then uses the active inventory system to open the shop.

Example:

openShop({
    shop = "weapon_shop",
    items = weaponShopItems,
    coords = vector3(100.0, 200.0, 300.0),
    job = "police",
})

registerShop(name, label, items, society)

Registers a named shop with associated items and an optional society for fund handling.

Supports either OXInv or QBInv (with QBInvNew flag).

Example:

registerShop("fishing_shop", "Bait & Tackle", {
    { item = "fishing_rod", price = 50 },
    { item = "bait", price = 5 }
}, "fishing_society")

PreviousScale EntityNextSkillcheck

Last updated 3 days ago