# 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="https://3417600217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUstiQCWWtCVFlim0J8Rh%2Fuploads%2Fzm4toiguLtiyAOLsMD4f%2Ftablet.png?alt=media&#x26;token=62a1f107-9056-4987-8386-a2ed6c00b72b" alt=""><figcaption><p>tablet.png</p></figcaption></figure>
