If you wish to use an item (instead of the default command that comes with the resource).
Add the following line to qb-core/shared/items.lua
['racingtablet'] = { ['name'] = 'racingtablet', ['label'] = 'Racing tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'racingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Seems like something to do with cars.' },
Add the following image file as qb-inventory/html/images/racingtablet.png
Add this section to the end of rahe-racing/public/framework/server.lua
QBCore.Functions.CreateUseableItem('racingtablet', function(source, item)
TriggerClientEvent('rahe-racing:client:openTablet', source)
end)
Add this section to ox_inventory/data/items.lua
['racingtablet'] = {
label = 'Racing tablet',
weight = 500,
description = 'Seems like something to do with cars.',
stack = false,
client = {
export = 'rahe-racing.racingtablet',
}
},
Add the following image file as ox_inventory/web/images/racingtablet.png
Create the item in your inventory system. Trigger the following client-side events:
Event rahe-racing:client:openTablet on tablet item use.