Item setup

Items for VehicleRentals. The item name must be rental_paperwork. That string is hardcoded on add and remove.

The item name must be rental_paperwork. That string is hardcoded on add and remove.

It is not a usable item. Metadata is written on rent; the rental menu reads it to offer a return.

MetadataPurpose
plateMatch the spawned vehicle
rentalLocationMust equal the desk key in Config.Agencies
vehNetIdNetwork id at rent time
vehNameStock label
renterCharacter display name
descriptionLocale paperwork line

qb-inventory / ps-inventory must keep that data on the item (info).

Copy rental_paperwork.png from [INSTALL]/images/ into:

InventoryImage folder
ox_inventoryox_inventory/web/images/
qb-inventory / ps-inventoryhtml/images/
one_inventoryone_inventory/web/images/

OX is ox_inventory (ESX and Qbox that run ox use this tab). QB is qb-core/shared/items.lua. one_inventory only needs the PNG in that folder.

Add to ox_inventory/data/items.lua:

['rental_paperwork'] = {
    label = 'Rental Paperwork',
    weight = 220,
    stack = false,
    close = true,
    description = 'Paperwork for a rental vehicle',
},

Add to your QBCore shared items (qb-core/shared/items.lua):

['rental_paperwork'] = { name = 'rental_paperwork', label = 'Rental Paperwork', weight = 220, type = 'item', image = 'rental_paperwork.png', unique = true, useable = false, shouldClose = false, combinable = nil, description = 'Paperwork for a rental vehicle' },