Item Support
Find information on configuring for other resources!
Enabling item support
Inventory = {
itemName = "salesign",
oxInventory = false,
quasarInventory = false,
coreInventory = false,
ESX = false,
vRP = false,
qbCore = false,
}
Item support is configured in the Inventory section of your config.lua file. Where item support is enabled, users using the /salesign command will need the item in order to setup a sale sign, regardless of permissions you have enabled.
ESX Item Support
Run the following SQL into your ESX database to add the item:
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('salesign', 'Car Sale Sign', 1, 0, 1);
OX Inventory
The following code needs to be added into ox_inventory/data/items.lua within your OX_Inventory resource:
['salesign'] = {
label = 'Car Sale Sign',
weight = 220,
server = {
export = 'carsalesign.useSign',
},
},
QB-Core Item Support
Add the following lines of code into your qb-core/shared/items.lua file:
salesign = {
name = 'salesign',
label = 'Car Sale Sign',
weight = 1500,
type = 'item',
image = nil,
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Car Sale Sign'
},
Feel free to adjust the various item settings depending on your server requirements!
vRP Inventory Support
Firstly, head to the config.lua file and enable vRP in the config. Next, add the following line of code into your vrp/cfg/items.lua file:
local saleSignOptions = {}
saleSignOptions["Use"] = {function(player,choice)
local user_id = vRP.getUserId(player)
if user_id ~= nil then
TriggerEvent("SaleSigns:useSign", player, 'salesign')
end
end}
["salesign] = {"Sale Sign"," ",function(args) return saleSignOptions end,0.1}
Quasar Inventory Support
Register the items within your inventory as necessary
Core Inventory Support
Register the items within your inventory as necessary
Last updated
Was this helpful?