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
  • stashcontrol.lua
  • checkStashItem(stashes, itemTable)
  • openStash(data)
  • getStash(stashName)
  • stashRemoveItem(stashItems, stashName, items)
  1. Dependency
  2. Jim_Bridge

Stash Control

stashcontrol.lua

This module handles logic for interacting with stashes—shared inventories for crafting, jobs, or storage systems.

checkStashItem(stashes, itemTable)

Retrieves (or updates) a local stash cache entry with a timeout.

Example:

local found, foundinStash = checkStashItem({"crafting_stash"}, { item = "steel", amount = 2 })
if found then print("Found item in "..foundInStash) end

openStash(data)

Opens a stash using the active inventory system.

Checks for job or gang restrictions before opening the stash.

Example:

openStash({
    stash = "playerStash",
    label = "Player Stash",
    coords = vector3(100, 200, 30)
})

getStash(stashName)

Retrieves the stash data by name (usually used for querying contents).

Example:

local items = getStash("playerStash")
for k, v in pairs(items) do
    print(k)
end

stashRemoveItem(stashItems, stashName, items)

Removes specified items from a stash. Used during crafting or transfers.

Example:

stashRemoveItem(currentItems, "playerStash", { iron = 2, wood = 5 })

PreviousSociety BankingNextTargets

Last updated 3 days ago