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
  • crafting.lua
  • craftingMenu(data)
  1. Dependency
  2. Jim_Bridge

Crafting

crafting.lua

These functions support crafting logic, such as opening crafting menus, handling multi-craft operations, and creating item data from recipes.

craftingMenu(data)

Opens a menu for selecting the quantity to craft.

Presents the player with multiple crafting quantities based on Config.Crafting.MultiCraftAmounts.

Parameters:

  • item (string): The item to craft.

  • craft (table): The crafting recipe.

  • craftable (table): Crafting options.

  • coords (vector3): Where crafting occurs.

  • stashName (string): The stash name(s) for item availability.

  • onBack (function): Callback when returning.

  • metadata (table, optional): Metadata for the crafted item.

Example:

craftingMenu({
     craftable = {
         Header = "Weapon Crafting",
         Recipes = {
             [1] = {
                 ["weapon_pistol"] = { ["steel"] = 5, ["plastic"] = 2 },
                 amount = 1,
             },
             -- More recipes...
         },
         Anims = {
             animDict = "amb@prop_human_parking_meter@male@idle_a",
             anim = "idle_a",
         },
     },
     coords = vector3(100.0, 200.0, 300.0),
     stashTable = "crafting_stash",
     job = "mechanic",
     onBack = function() print("Returning to previous menu") end,
})


PreviousContext MenusNextDrawText

Last updated 4 days ago