⚙️Integration

Item creation

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)

Last updated