🦄Unique phones
What are unique phones?
A phone is bound to a phone item, not to a character. Every phone is like a physical phone and can be used with all stored data. You can give your phone to another player and they will be able to use it with all data stored in it.
How to use unique phones?
To have unique phones, you need one of the following inventories:
ox_inventory - Recommended
How to enable unique phones?
To enable unique phones you need to set Config.Item.UniquePhones
and Config.Item.Require
to true
in /config/config.lua
.
How to add unique phones to your inventory?
ox_inventory
Make sure to set Config.Item.Inventory
to ox_inventory
in /config/config.lua
.
You need to register the phone items to your ox_inventory
. You can do it by adding the following code to your inventory ox_inventory/data/items.lua
.
Register the following items based on the phone system you're using - YFlip Phone, YPhone or YSeries(bundle). All items should have the same body, you need to repeat it for each. Or you can use the included items in the downloaded package.
Replace ...
with the code block below
qb-inventory
Make sure to set Config.Item.Inventory
to qb-inventory
in /config/config.lua
.
Also you need to modify your [phone]
item in qb-core/shared/items.lua
, set useable
and shouldClose
to true
.
Go to
qb-inventory/server/main.lua
inside the functionlocal function AddItem(source, item, amount, slot, info):173
, add the following code: Location Preview
Go to
qb-inventory/server/main.lua
and find the lineslot = tonumber(slot)
inside the functionlocal function RemoveItem(source, item, amount, slot):230
, add the following code: Location Preview
qb-inventory v2.0.0 and above
Make sure to set Config.Item.Inventory
to qb-inventory
in /config/config.lua
.
Also you need to modify your [phone]
item in qb-core/shared/items.lua
, set useable
and shouldClose
to true
.
Go to
qb-inventory/server/functions.lua
at the end of the functionlocal function AddItem(source, item, amount, slot, info):567
, add the following code: Location Preview
Go to
qb-inventory/server/functions.lua
at the end of the functionlocal function RemoveItem(source, item, amount, slot):685
, add the following code: Location Preview
lj-inventory
Follow the steps for
qb-inventory
and setConfig.Item.Inventory
tolj-inventory
in/config/config.lua
.
ps-inventory
Follow the steps for
qb-inventory
and setConfig.Item.Inventory
tops-inventory
in/config/config.lua
.
codem-inventory
Set
Config.Item.Inventory
tocodem-inventory
in/config/config.lua
.
tgiann-inventory
Set
Config.Item.Inventory
totgiann-inventory
in/config/config.lua
.
core-inventory
Set Config.Item.Inventory
to core-inventory
in /config/config.lua
.
Last updated