Configuration
Notify
Notify = function(text, method)
Your_Notify_Script(text, method)
end
Inventory
GetItemName = function(id, item)
local itemData = exports.ox_inventory:GetItem(id, item) -- ox
local itemData = exports['qb-inventory']:GetItemByName(id, item) -- qb
return itemData and itemData.count or 0
end
AddItem = function(id, name, amount, meta)
if amount > 0 then
exports.ox_inventory:AddItem(id, name, amount) -- ox
exports['qb-inventory']:AddItem(id, name, amount, false, meta) -- qb
end
end
RemoveItem = function(id, name, amount)
return exports.ox_inventory:RemoveItem(id, name, amount) and true or false -- ox
return exports['qb-inventory']:RemoveItem(id, name, amount) and true or false -- qb
end
Support Another Inventory Scripts
Config
config = {}
config.debug = false
config.restartingame = false
config.locale = {
notify = {
insufficient = 'Insufficient funds',
purchase = 'Purchase successful',
failed = 'Failed to process payment',
itemsold = 'Item sold successfully',
invfailed = 'Unable to access the inventory',
noitem = 'You don\'t have this item or invalid amount',
nolicense = 'You don\'t have weapon license'
},
text = {
open = 'E'
}
}
config.shops = {
food_market = {
sell = false,
allowedJobs = false,
blip = {
using = true,
label = 'Food Market',
color = 2,
sprite = 52,
scale = 1.0
},
zone = {
title = '🛒 Food Market',
desc = 'A supermarket offering a wide range of everyday products and essentials',
textui = 'Food Market',
pos = {
vec3(-3039.3, 585.11, 7.92),
vec3(25.05, -1347.33, 29.8)
},
size = vec3(2.5, 2.5, 2.0),
opendist = 1.3,
},
itembuy = {
[1] = {
name = 'Water',
code = 'water',
img = 'water',
price = 5,
label = 'Buy'
},
[2] = {
name = 'Coffee',
code = 'coffee',
img = 'coffee',
price = 5,
label = 'Buy'
}
},
sellshop = {}
},
farm_market = {
sell = true,
allowedJobs = {'police'},
blip = {
using = true,
label = 'Farm Market',
color = 5,
sprite = 52,
scale = 1.0
},
zone = {
title = '📦 Farm Market',
desc = 'A farm market offering fresh and locally sourced produce a farm-to-table experience.',
textui = 'Farm Market',
pos = {
vec3(-1043.422, 5326.849, 44.56581),
vec3(163.2128, 6633.643, 31.60007)
},
size = vec3(2.5, 2.5, 2.0),
opendist = 1.3
},
itembuy = {
[1] = {
name = 'Orange Seed',
code = 'farm_orange_seed',
img = 'farm_orange_seed',
price = 5,
label = 'Buy'
},
[2] = {
name = 'Tomato Seed',
code = 'farm_tomato_seed',
img = 'farm_tomato_seed',
price = 5,
label = 'Buy'
}
},
sellshop = {
[1] = {
name = 'Tomato A',
code = 'farm_tomato_a',
img = 'farm_tomato_a',
price = 5,
label = 'Sell'
},
[2] = {
name = 'Tomato B',
code = 'farm_tomato_b',
img = 'farm_tomato_b',
price = 5,
label = 'Sell'
}
}
},
gun_shop = {
sell = false,
allowedJobs = false,
license = 'weapon',
blip = {
using = true,
label = 'Gun Market',
color = 1,
sprite = 156,
scale = 1.0
},
zone = {
title = '🔫 Gun Market',
desc = 'A gun shop offering a selection of firearms, ammunition, and accessories.',
textui = 'Gun Market',
pos = {
vec3(-330.23, 6083.89, 31.46),
vec3(-662.179, -934.962, 21.828)
},
size = vec3(2.5, 2.5, 2.0),
opendist = 1.3
},
itembuy = {
[1] = {
name = 'Pistol',
code = 'WEAPON_PISTOL',
img = 'WEAPON_PISTOL',
price = 5,
label = 'Buy'
},
[2] = {
name = 'Flashlight',
code = 'WEAPON_FLASHLIGHT',
img = 'WEAPON_FLASHLIGHT',
price = 5,
label = 'Buy'
}
},
sellshop = {}
},
police_armory = {
sell = true,
allowedJobs = {
'police'
},
license = 'weapon',
blip = {
using = false,
label = 'Gun Market',
color = 1,
sprite = 156,
scale = 1.0
},
zone = {
title = '👮 Police Armory',
desc = 'A gun shop offering a selection of firearms, ammunition, and accessories.',
textui = 'Police Armory',
pos = {
vec3(451.9141, -980.1337, 30.68959)
},
size = vec3(2.5, 2.5, 2.0),
opendist = 1.3
},
itembuy = {
[1] = {
name = 'Pistol',
code = 'WEAPON_PISTOL',
img = 'WEAPON_PISTOL',
price = 5,
label = 'Buy'
},
[2] = {
name = 'Flashlight',
code = 'WEAPON_FLASHLIGHT',
img = 'WEAPON_FLASHLIGHT',
price = 5,
label = 'Buy'
}
},
sellshop = {
[1] = {
name = 'Pistol',
code = 'WEAPON_PISTOL',
img = 'WEAPON_PISTOL',
price = 5,
label = 'Sell'
},
[2] = {
name = 'Flashlight',
code = 'WEAPON_FLASHLIGHT',
img = 'WEAPON_FLASHLIGHT',
price = 5,
label = 'Sell'
}
}
}
}
Last updated