> For the complete documentation index, see [llms.txt](https://docs.scriptsfivem.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scriptsfivem.com/resources/sfctab/open-tablet.md).

# Open tablet

{% hint style="warning" %}
I recommend ox\_inventory.
{% endhint %}

{% embed url="<https://github.com/overextended/ox_inventory>" %}

## For resource ox\_inventory

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

<pre class="language-lua"><code class="lang-lua">
<strong>['tablet'] = {
</strong>	label = 'tablet',
	weight = 500,
	stack = false,
	client = {
		export = 'ox_inventory_examples.tablet', -- if you use ox_inventory_examples 'yourscript.tablet'
	},
	consume = 0
},

</code></pre>

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

```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`&#x20;

<figure><img src="/files/iPq2goJtjfoFYzDFrPp5" alt=""><figcaption><p>tablet.png</p></figcaption></figure>
