Unique phones
Bind a phone to its inventory item with Config.MetaItem, so it can change hands with all its data.
The phone belongs to the item, not the character. It keeps its own number, messages, photos and contacts, so a phone that is given away, dropped or stolen works exactly the same for whoever holds it next.
Turn it on
Config.MetaItem = trueRequirements
Your inventory must support metadata. Supported out of the box:
| Inventory | Item list |
|---|---|
| ox_inventory — recommended | ox_inventory/data/items.lua |
| qb-inventory | qb-core/shared/items.lua |
| tgiann-inventory | tgiann-inventory/items/items.lua |
| qs-inventory | its own item list |
| core_inventory | its own item list |
Anything else needs SetItemData and UpdateItemData — see Custom inventory.
Item definitions are the same ones from Installation.
The phone items must be unique and non-stacking (stack = false in ox, unique = true in qb-style lists). Two phones in one slot share one set of metadata, putting two players on the same phone.
What's stored on the item
metadata = {
phoneID = 'GKS202501HM1D', -- written when the phone is first bound
eSIMNumber = '28946041', -- updated when the number changes
phoneLang = 'en' -- updated when the language changes
}ox_inventory and tgiann-inventory show phoneID and eSIMNumber in the item tooltip as Phone ID and Phone Number.
Restart gksphone after changing Config.MetaItem.

