๐Ÿงพ
docs.scriptsfivem.com
  • ๐Ÿ‘‹Welcome
  • ๐ŸงพResources
    • ๐Ÿ“ฑsfphone
      • Installations
      • Config
      • Exports
      • Open phone
    • ๐Ÿš—sfracing
      • Installations
      • Config
      • Exports
    • ๐Ÿ’ตsfbanking
      • Installations
      • Config
      • Exports
    • ๐Ÿ’ปsfctab
      • Installations
      • Config
      • Open tablet
      • Exports // Triggers
    • ๐Ÿ› ๏ธsfcrafting
      • Installations
      • Config
      • Open crafting table
    • ๐Ÿ””sfnotify
      • Installations
      • Config
      • Exports // Triggers
    • ๐Ÿ‘ทโ€โ™‚๏ธsfjob
      • Installations
      • Config
      • Exports // Triggers
    • ๐Ÿ’ปsfjobtab
      • Installations
      • Config
      • Triggers
    • โŒšsfgps
      • Installations
      • Config
      • Exports
    • ๐Ÿ‘ฎsfpolice
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿฅsfems
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿ…ฟ๏ธsfgarages
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿ›๏ธsfdoj
      • Installations
      • Config
      • Exports/Triggers
    • ๐ŸŽฃsffishing
      • Installations
      • Config
      • Triggers
    • ๐Ÿš—sfvehicleshop
      • Installations
      • Config
    • ๐Ÿ”งsfmechanic
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿฐsfjail
      • Installations
      • Config
      • Exports
    • ๐Ÿ”‘sfkeys
      • Exports
Powered by GitBook
On this page
  1. Resources
  2. sfctab

Open tablet

PreviousConfigNextExports // Triggers

Last updated 2 months ago

I recommend ox_inventory.

For resource ox_inventory

Add the following code in the file ox_inventory/data/items.lua


['tablet'] = {
	label = 'tablet',
	weight = 500,
	stack = false,
	client = {
		export = 'ox_inventory_examples.tablet', -- if you use ox_inventory_examples 'yourscript.tablet'
	},
	consume = 0
},

Add the following code in the file ox_inventory_examples/client.lua or yourscript/client.lua

exports('tablet', function(data, slot)
	exports.ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent("sfctab:tabletopen")
		end
	end)
end)

Add the following images to the folder ox_inventory/web/images

๐Ÿงพ
๐Ÿ’ป
GitHub - overextended/ox_inventory: Slot-based inventory with metadata.GitHub
Logo
tablet.png