🏜️
Sahara Scripters
  • Welcome
    • Introduction
    • Community & Support
  • Premium Scripts
    • Charging Kiosk
      • Setup Guide
      • Configuration
      • Features
        • Charging System
        • Security
        • Rate Limiting
        • Logging System
        • Phones Management
        • Discord Integration
        • Target System
        • Blip System
        • Translations
      • Integration
        • Inventory Systems
        • Framework Migration
        • Logger Edit
      • Best Practices
      • Troubleshooting
      • Version History
  • Free Scripts
    • Elevator System
      • Setup & Configuration
      • Features Overview
      • Example Buildings
      • Troubleshooting
    • NPWD Renewed Weather APP
    • NPWD QBX Services APP
Powered by GitBook
On this page
  • 🔧 Supported Systems
  • 📱 Phone Item Setup
  • 🔄 Integration Example
  • 📋 Required Functions
  1. Premium Scripts
  2. Charging Kiosk
  3. Integration

Inventory Systems

🔧 Supported Systems

  • ox_inventory

  • qb-inventory

📱 Phone Item Setup

phoneItemName = 'phone'  -- Your inventory item name

🔄 Integration Example

-- For ox_inventory

--- Retrieve a phone item from player inventory by phone number
--- @param source number The player's server id
--- @param phoneNumber string The phone number to find
--- @return { slot: number, metadata: table }|nil phoneData Phone item data if found
function EditableInventory.getPhoneWithNumber(source, phoneNumber)
    local slotId = exports.ox_inventory:GetSlotIdWithItem(
        source,
        config.phoneItemName,
        { phoneNumber = phoneNumber }
    )
    return exports.ox_inventory:GetSlot(source, slotId)
end

📋 Required Functions

--- Retrieve a phone item from player inventory by phone number
--- @param source number The player's server id
--- @param phoneNumber string The phone number to find
--- @return { slot: number, metadata: table }|nil phoneData Phone item data if found
function EditableInventory.getPhoneWithNumber(source, phoneNumber)


--- Remove a phone from player inventory
--- @param source number The player's server id
--- @param phoneNumber string The phone number to remove
--- @return boolean success Whether the phone was successfully removed
--- @return string? error Error message if removal failed
function EditableInventory.removePhone(source, phoneNumber)

--- Add a phone to player inventory
--- @param source number The player's server id
--- @param metadata table Phone metadata including phone number
--- @return boolean success Whether the phone was successfully added
--- @return string? error Error message if addition failed
function EditableInventory.addPhone(source, metadata)

These functions are required for the script to function properly. They handle retrieving and removing phone items from a player's inventory based on their phone number.


Integrated by Sahara Scripters - Making different systems talk (mostly to themselves)

PreviousIntegrationNextFramework Migration

Last updated 4 months ago