Shops
Details
Here’s where all the fun is hidden, you can define your shops however you want, and have buy/sell in one, or even separately. For proper example on what you want to do, please check our examples. But at the moment, it’s only a basic shops setup.
Configuration file
config/shops.lua
---@type table<string, ShopConfig>
return {
General = {
label = 'Shop',
description = 'A small convenience store that is open 24/7.',
paymentMethods = {
buy = { 'cash', 'bank' },
sell = { 'cash' }
},
settings = {
useStock = false,
useCategories = true,
fluctuatePrices = true
},
blip = {
sprite = 59, color = 69, scale = 0.8
},
items = {
buy = {
{ name = 'burger', price = 10 },
{ name = 'water', price = 10 },
{ name = 'cola', price = 10 },
},
sell = {
{ name = 'burger', price = 10 },
}
},
locations = {
{ coords = vec3(25.06, -1347.32, 29.7), size = vector3(0.7, 0.5, 0.4), rotation = 0.0, distance = 1.5 },
{ coords = vec3(-3039.18, 585.13, 8.11), size = vector3(0.6, 0.5, 0.4), rotation = 15.0, distance = 1.5 },
{ coords = vec3(-3242.2, 1000.58, 13.03), size = vector3(0.6, 0.6, 0.4), rotation = 175.0, distance = 1.5 },
{ coords = vec3(1728.39, 6414.95, 35.24), size = vector3(0.6, 0.6, 0.4), rotation = 65.0, distance = 1.5 },
{ coords = vec3(1698.37, 4923.43, 42.26), size = vector3(0.5, 0.5, 0.4), rotation = 235.0, distance = 1.5 },
{ coords = vec3(1960.54, 3740.28, 32.54), size = vector3(0.6, 0.5, 0.4), rotation = 120.0, distance = 1.5 },
{ coords = vec3(548.5, 2671.25, 42.36), size = vector3(0.6, 0.5, 0.4), rotation = 10.0, distance = 1.5 },
{ coords = vec3(2678.29, 3279.94, 55.44), size = vector3(0.6, 0.5, 0.4), rotation = 330.0, distance = 1.5 },
{ coords = vec3(2557.19, 381.4, 108.82), size = vector3(0.6, 0.5, 0.4), rotation = 0.0, distance = 1.5 },
{ coords = vec3(373.13, 326.29, 103.77), size = vector3(0.6, 0.5, 0.4), rotation = 345.0, distance = 1.5 },
}
},
Liquor = {
label = 'Liquor Store',
blip = {
sprite = 93, color = 69, scale = 0.8
},
items = {
buy = {
{ name = 'burger', price = 10 },
{ name = 'water', price = 10 },
{ name = 'cola', price = 10 },
}
},
locations = {
{ coords = vec3(1134.9, -982.34, 46.41), size = vector3(0.5, 0.5, 0.4), rotation = 96.0, distance = 1.5 },
{ coords = vec3(-1222.33, -907.82, 12.43), size = vector3(0.6, 0.5, 0.4), rotation = 32.7, distance = 1.5 },
{ coords = vec3(-1486.67, -378.46, 40.26), size = vector3(0.6, 0.5, 0.4), rotation = 133.77, distance = 1.5 },
{ coords = vec3(-2967.0, 390.9, 15.14), size = vector3(0.7, 0.5, 0.4), rotation = 85.23, distance = 1.5 },
{ coords = vec3(1165.95, 2710.20, 38.26), size = vector3(0.6, 0.5, 0.4), rotation = 178.84, distance = 1.5 },
{ coords = vec3(1393.0, 3605.95, 35.11), size = vector3(0.6, 0.6, 0.4), rotation = 200.0, distance = 1.5 }
}
},
YouTool = {
label = 'YouTool',
blip = {
sprite = 402, color = 69, scale = 0.8
},
items = {
buy = {
{ name = 'lockpick', price = 10 }
}
},
locations = {
{ coords = vec3(2746.8, 3473.13, 55.67), size = vector3(0.6, 3.0, 1.8), heading = 65.0, distance = 3.0 }
}
},
Ammunation = {
label = 'Ammunation',
blip = {
sprite = 110, color = 69, scale = 0.8
},
items = {
buy = {
{ name = 'ammo-9', price = 5, },
{ name = 'WEAPON_KNIFE', price = 200 },
{ name = 'WEAPON_BAT', price = 100 },
{ name = 'WEAPON_PISTOL', price = 1000, metadata = { registered = true }, license = 'weapon', blurUnavailable = true }
},
},
locations = {
{ coords = vec3(-660.92, -934.10, 21.94), size = vector3(0.6, 0.5, 0.4), heading = 180.0, distance = 2.0 },
{ coords = vec3(808.86, -2158.50, 29.73), size = vector3(0.6, 0.5, 0.4), heading = 360.0, distance = 2.0 },
{ coords = vec3(1693.57, 3761.60, 34.82), size = vector3(0.6, 0.5, 0.4), heading = 227.39, distance = 2.0 },
{ coords = vec3(-330.29, 6085.54, 31.57), size = vector3(0.6, 0.5, 0.4), heading = 225.0, distance = 2.0 },
{ coords = vec3(252.85, -51.62, 70.0), size = vector3(0.6, 0.5, 0.4), heading = 70.0, distance = 2.0 },
{ coords = vec3(23.68, -1106.46, 29.91), size = vector3(0.6, 0.5, 0.4), heading = 160.0, distance = 2.0 },
{ coords = vec3(2566.59, 293.13, 108.85), size = vector3(0.6, 0.5, 0.4), heading = 360.0, distance = 2.0 },
{ coords = vec3(-1117.61, 2700.26, 18.67), size = vector3(0.6, 0.5, 0.4), heading = 221.82, distance = 2.0 },
{ coords = vec3(841.05, -1034.76, 28.31), size = vector3(0.6, 0.5, 0.4), heading = 360.0, distance = 2.0 }
},
},
PoliceArmoury = {
label = 'Police Armoury',
group = 'police',
blip = {
sprite = 110, color = 84, scale = 0.8
},
items = {
{ name = 'ammo-9', price = 5, },
{ name = 'ammo-rifle', price = 5, },
{ name = 'WEAPON_FLASHLIGHT', price = 200 },
{ name = 'WEAPON_NIGHTSTICK', price = 100 },
{ name = 'WEAPON_PISTOL', price = 500, metadata = { registered = true, serial = 'POL' }, license = 'weapon' },
{ name = 'WEAPON_CARBINERIFLE', price = 1000, metadata = { registered = true, serial = 'POL' }, license = 'weapon', grade = 3 },
{ name = 'WEAPON_STUNGUN', price = 500, metadata = { registered = true, serial = 'POL' } }
},
locations = {
{ coords = vec3(453.21, -980.03, 30.68), size = vector3(0.5, 3.0, 1.5), heading = 270.0, distance = 6 }
}
},
Medicine = {
label = 'Medicine Cabinet',
group = {
['ambulance'] = 0
},
blip = {
sprite = 403, color = 69, scale = 0.8
},
items = {
{ name = 'medikit', price = 26 },
{ name = 'bandage', price = 5 }
},
locations = {
{ coords = vec3(306.3687, -601.5139, 43.28406), size = vector3(0.6, 0.5, 0.4), heading = 0.0, distance = 2.0 }
}
},
BlackMarketArms = {
label = 'Black Market (Arms)',
items = {
{ name = 'WEAPON_DAGGER', price = 5000, metadata = { registered = false }, currency = 'black_money' },
{ name = 'WEAPON_CERAMICPISTOL', price = 50000, metadata = { registered = false }, currency = 'black_money' },
{ name = 'at_suppressor_light', price = 50000, currency = 'black_money' },
{ name = 'ammo-rifle', price = 1000, currency = 'black_money' },
{ name = 'ammo-rifle2', price = 1000, currency = 'black_money' }
},
locations = {
{ coords = vec3(309.09, -913.75, 56.46) }
}
},
VendingMachineDrinks = {
label = 'Vending Machine',
items = {
{ name = 'water', price = 10 },
{ name = 'cola', price = 10 },
},
model = {
`prop_vend_soda_02`, `prop_vend_fridge01`, `prop_vend_water_01`, `prop_vend_soda_01`
}
}
}