If you don't want to use the command, you can use a tablet item instead.
Add the following lines to to qb-core/shared/items.lua
['truckingtablet'] = { ['name'] = 'truckingtablet', ['label'] = 'Trucking tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'truckingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = "There is an app on that."},
Add the image file to qb-inventory/html/images/truckingtablet.png
Add the following code to the end of kub_trucking/server/api/serverfunctions.lua
QBCore.Functions.CreateUseableItem("truckingtablet", function(source, item)
TriggerClientEvent("kub_trucking:client:openTablet", source)
end)
Add this section to ox_inventory/data/items.lua
['truckingtablet'] = {
label = 'Trucking tablet',
weight = 0,
description = "There is an app on that",
client = {
export = 'kub_trucking.truckingtablet',
}
},
Add the following image file as ox_inventory/web/images/truckingtablet.png
Add the following code to the end of kub_trucking/client/api/clientfunctions.lua
exports('truckingtablet', function(data, slot)
openTablet()
end)
Create the item in your inventory system. Trigger the following client-side event:
Event kub_trucking:client:openTablet on tablet item use.