Next Scripts
  • Introduction
  • PAID RESOURCES
    • 📦Job Creator
      • Installation
      • Configuration
        • Client Configuration
        • Server Configuration
      • Exports
        • Client Exports
        • Server Exports
      • Commands
      • FAQ
    • 🍂 Drug System
      • Installation
      • Configuration
    • 📢 Notify
      • Installation
      • Configuration
      • Exports
        • Client Exports
        • Server Exports
    • 🎇 Event Tablet
      • Installation
      • Configuration
  • FREE RESOURCES
    • 🍁 Npc Drug Sells
      • Installation
      • Configuration
    • 👆🏻 Targeting
      • Installation
      • Configuration
      • Client Exports
      • Examples
    • 💻 Dispatch
      • Installation
      • Client Exports
      • Server Exports
      • Commands
Powered by GitBook
On this page
  1. FREE RESOURCES
  2. 👆🏻 Targeting

Examples

PreviousClient ExportsNext💻 Dispatch

Last updated 11 months ago

Ox Inventory Give Item Feature

Select the player with targeting when giving items

At this of @ox_inventory/client.lua you can replace all the code of the callback with this

RegisterNUICallback('giveItem', function(data, cb)
    cb(1)
    TriggerEvent('ox_inventory:closeInventory')
    local id = exports.targeting:StartTargeting({})
    giveItemToTarget(id, data.slot, data.count)
end)

line