Register the GPS item in ox_inventory or qb-inventory.
The item name comes from config:
item = 'gps',
Change it here if your server uses another name — then match that name in your inventory files below.
Inventory setup#
In ox_inventory/data/items.lua:
['gps'] = {
label = 'GPS',
weight = 500,
stack = false,
close = true,
consume = 0,
description = 'Handheld GPS unit.',
client = {
event = '0r-gps:client:toggleGPS'
}
},
In qb-core/shared/items.lua (or your items file):
gps = {
name = 'gps',
label = 'GPS',
weight = 500,
type = 'item',
image = 'gps.png',
unique = false,
useable = true,
shouldClose = true,
description = 'Handheld GPS unit.'
},
0r-gps registers the item as usable on the server — you do not need a client export for QB.
Item image#
Put a gps.png in your inventory image folder (for example ox_inventory/web/images/). The script does not ship inventory icons.
ESX (database items)
If you use ESX with a classic item table, add a row for gps. The script still registers it as usable when the resource starts — you only need the item to exist in the database and in player inventories.