I welcome you CFX community!
Today I present to you the v2 store system! This is a completely redesigned version of the previous resource, which provides accessibility for all frameworks (ESX, QBCore, Standalone), completely new functionality, huge editing capabilities using a configuration file, as well as a completely new unique design. I’m sure you and your players will love it!
This system includes a nice user interface, a convenient configuration file, the ability to configure the entire resource. The resource includes 23 preset stores broken down by name with the possibility of robbing any cash register on the map with the cooldown enabled using any weapon, just smash it! As well as preset locations for the random appearance of the black market with a cooldown to reopen for all players.
Demonstration of the system:
Screenshots:
Example of a configuration file:
--/*
-- ██████╗░██╗░░░██╗██████╗░███████╗██╗░░░██╗███████╗░██████╗████████╗███╗░░██╗██╗██╗░░██╗
-- ██╔══██╗██║░░░██║██╔══██╗██╔════╝██║░░░██║██╔════╝██╔════╝╚══██╔══╝████╗░██║██║██║░██╔╝
-- ██████╦╝██║░░░██║██████╔╝█████╗░░╚██╗░██╔╝█████╗░░╚█████╗░░░░██║░░░██╔██╗██║██║█████═╝░
-- ██╔══██╗██║░░░██║██╔══██╗██╔══╝░░░╚████╔╝░██╔══╝░░░╚═══██╗░░░██║░░░██║╚████║██║██╔═██╗░
-- ██████╦╝╚██████╔╝██║░░██║███████╗░░╚██╔╝░░███████╗██████╔╝░░░██║░░░██║░╚███║██║██║░╚██╗
-- ╚═════╝░░╚═════╝░╚═╝░░╚═╝╚══════╝░░░╚═╝░░░╚══════╝╚═════╝░░░░╚═╝░░░╚═╝░░╚══╝╚═╝╚═╝░░╚═╝*/
Config = {}
--If ESX = false and QBCore = false, then Standalone will turn on
--Are you using ESX?
Config.UseESX = true
--Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
--Do you want to use a weight check before buying an item (ESX)?
Config.WeightSystem = false
--Are you using QBCore?
Config.UseQBCore = false
--Your own export to get the player's job
Config.StandaloneJobCheckExport = nil
--Interaction Button
Config.ShopOpenButton = 38
--Do you want to be able to rob the cash register?
Config.Robberies = true
--Random robbery time from 10 to 30 seconds
Config.TimeRob = math.random(10,30)
--Random reward for robbery from $50 to $500
Config.MoneyRob = math.random(50,500)
--Interaction Button
Config.RobButton = 23
--Do you want to use the job for robberies
Config.UseJobRobESX = true
--Do you want to use the job for robberies
Config.UseJobRobQBCore = false
--Job for a police
Config.JobPolice = {"police", "unemployed"}
--Job for a robbery
Config.JobRob = {"gang1", "unemployed"}
--Objects for robbery
Config.ObjeRob = {'prop_till_01'}
--Cooldown to robbery
Config.Cooldown = 600000 --10 min
--How many maximum units of one product can a player buy
Config.basketMaxValue = 23
function PoliceAlert(policeNameJobs) --You can set up your event to notify the police about the beginning of a robbery. This is a client function.
--ESX
if ESX.GetPlayerData().job.name == policeNameJobs then
ShowAdvNotification("CHAR_CALL911", "Dispatcher", "Robbery in progress", "Robbery is taking place. No coordinates!")
end
--QBCore
-- if Player.PlayerData.job.name == policeNameJobs then
-- ShowAdvNotification("CHAR_CALL911", "Dispatcher", "Robbery in progress", "Robbery is taking place. No coordinates!")
-- end
--Standalone
-- if job.name == policeNameJobs then
-- ShowAdvNotification("CHAR_CALL911", "Dispatcher", "Robbery in progress", "Robbery is taking place. No coordinates!")
-- end
end
function BlackMarketLocations()
local locationsTable = { --Store locations [Black Market]
vector3(0.6, -1824.3, 28.5),
vector3(679.0, -897.3, 22.4),
vector3(-125.9, 1895.7, 196.3),
vector3(124.9, 6644.6, 30.7),
}
--Return a random element from the locations table
return locationsTable[math.random(#locationsTable)]
end
Config.Shops = {
{
shopName = "24/7", --Store name
interactionDistance = 2.0, --Distance for interaction with the store
useStreetNameShop = true, --Do you want to use name of the street (Shop) if false then streen name = "Secret"
alternativeStreetNameShop = "burevestnik.tebex.io", --It will work if useStreetNameShop = false
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 59, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 25, --Blip color.
blipText = "24/7", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the store. If "all", then everyone can interact with the store.
locations = { --Store locations
vector3(25.7, -1347.2, 28.4),
vector3(373.8, 325.8, 102.5),
vector3(2557.4, 382.2, 107.6),
vector3(-3038.9, 585.9, 102.5),
vector3(-3241.9, 1001.4, 11.8),
vector3(547.4, 2671.7, 41.1),
vector3(1961.4, 3740.6, 31.3),
vector3(2678.9, 3280.6, 54.2),
vector3(1729.2, 6414.1, 34.0),
},
categories = { --Minimum 0 categories, maximum 4
"Water",
"Meal",
"Tools",
"Various",
},
products = {
{ --Category 1
{'orange',"Orange",9,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'bread',"bread",10,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer','Beer v1',4,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer1','Beer v2',22,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer2','Beer v3',25,120}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer3','Beer box',27,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer4','Beer v4',31,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 2
{'pizza','Pizza',5,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'burger',"Burger",6,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'chips','Chips',3,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hotdog','Hot dog',7,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'donut','Donut',46,3}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 3
{'wrench','Wrench',194,50}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hammer',"Hammer",191,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'toolkit',"Tool kit",250,60}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 4
{'boombox','Boombox',610,40}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fak',"First aid kit",252,20}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fishingrod',"Fishing rod",207,200}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'gear',"Gear",208,35}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'drone',"Drone",779,800}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
}
},
{
shopName = "Robs Liquor", --Store name
interactionDistance = 2.0, --Distance for interaction with the store
useStreetNameShop = true, --Do you want to use name of the street (Shop) if false then streen name = "Secret"
alternativeStreetNameShop = "burevestnik.tebex.io", --It will work if useStreetNameShop = false
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 59, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 25, --Blip color.
blipText = "Robs Liquor", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the store. If "all", then everyone can interact with the store.
locations = { --Store locations
vector3(1135.8, -982.2, 45.4),
vector3(-1222.9, -906.9, 11.3),
vector3(-1487.5, -379.1, 39.1),
vector3(-2968.2, 390.7, 14.0),
vector3(1166.0, 2708.9, 37.1),
vector3(1392.5, 3604.6, 33.9),
vector3(-1393.4, -606.6, 29.3),
vector3(-559.9, 287.0, 81.1),
},
categories = { --Minimum 0 categories, maximum 4
"Water",
"Meal",
"Tools",
"Various",
},
products = {
{ --Category 1
{'orange',"Orange",9,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'bread',"bread",10,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer','Beer v1',4,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer1','Beer v2',22,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer2','Beer v3',25,120}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer3','Beer box',27,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer4','Beer v4',31,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 2
{'pizza','Pizza',5,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'burger',"Burger",6,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'chips','Chips',3,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hotdog','Hot dog',7,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'donut','Donut',46,3}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 3
{'wrench','Wrench',194,50}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hammer',"Hammer",191,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'toolkit',"Tool kit",250,60}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 4
{'boombox','Boombox',610,40}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fak',"First aid kit",252,20}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fishingrod',"Fishing rod",207,200}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'gear',"Gear",208,35}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'drone',"Drone",779,800}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
}
},
{
shopName = "LTD Gasoline", --Store name
interactionDistance = 2.0, --Distance for interaction with the store
useStreetNameShop = true, --Do you want to use name of the street (Shop) if false then streen name = "Secret"
alternativeStreetNameShop = "burevestnik.tebex.io", --It will work if useStreetNameShop = false
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 59, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 25, --Blip color.
blipText = "LTD Gasoline", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the store. If "all", then everyone can interact with the store.
locations = { --Store locations
vector3(-48.5, -1757.5, 28.4),
vector3(1163.3, -323.8, 68.2),
vector3(-707.5, -914.2, 18.2),
vector3(-1820.5, 792.5, 137.1),
vector3(1698.3, 4924.4, 41.0),
},
categories = { --Minimum 0 categories, maximum 4
"Water",
"Meal",
"Tools",
"Various",
},
products = {
{ --Category 1
{'orange',"Orange",9,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'bread',"bread",10,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer','Beer v1',4,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer1','Beer v2',22,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer2','Beer v3',25,120}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer3','Beer box',27,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'beer4','Beer v4',31,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 2
{'pizza','Pizza',5,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'burger',"Burger",6,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'chips','Chips',3,12}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hotdog','Hot dog',7,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'donut','Donut',46,3}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 3
{'wrench','Wrench',194,50}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'hammer',"Hammer",191,15}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'toolkit',"Tool kit",250,60}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
{ --Category 4
{'boombox','Boombox',610,40}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fak',"First aid kit",252,20}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'fishingrod',"Fishing rod",207,200}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'gear',"Gear",208,35}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'drone',"Drone",779,800}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
}
},
{
shopName = "Black Market", --Store name
openCooldown = 600000, --10 min
statusCooldown = false, --10 min
interactionDistance = 2.0, --Distance for interaction with the store
useStreetNameShop = true, --Do you want to use name of the street (Shop) if false then streen name = "Secret"
alternativeStreetNameShop = "burevestnik.tebex.io", --It will work if useStreetNameShop = false
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 429, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 2, --Blip color.
blipText = "Black Market", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"test", "unemployed"}, --Jobs that can interact with the store. If "all", then everyone can interact with the store.
locations = {BlackMarketLocations()}, --Store locations
categories = { --Minimum 0 categories, maximum 4
--"Basic",
},
products = {
{ --Category 1
{'weed','Weed',14,100}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'bag','Bag',17,10}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'gloves','Gloves',-3,3}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'bong','Bong',62,5}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
{'binoculars','Binoculars',63,200}, --1 - the name of the item in the database | 2 - label | 3 - the name of the image of the item in the img package | 4 - price
},
}
}
}
Config.Translation = {
['menu'] = 'Press ~INPUT_CONTEXT~ to ~g~interact',
['buy1'] = 'You bought: ~g~',
['buy2'] = ' ~w~- ~g~$',
['nomoney'] = '~r~You do not have enough Money!',
['noaccess'] = '~r~Bro, get out of here!',
['noweight'] = '~r~You dont have enough space!',
['robbery1'] = 'Press ~g~F~w~ to rob',
['robbery2'] = 'You stole: ',
['robbery3'] = '~g~$',
}
--Exports
--exports.Burevestnik_shops:bur_open_shop_by_id(1) --where the number is the store id
Optimization (The script consumes):
0.00 ms in a quiet state.
0.01 ms in an active state.
What does this store system include:
-
This system works on all versions of ESX, QBCore, as well as STANDALONE!
-
Beautiful user interface!
-
The ability to enable blips on the map!
-
The ability to enable markers!
-
Incredibly customizable configuration file!
-
Stores display the name and street where they are located!
-
Random places where the black market appears!
-
Cooldown on the re-opening of the black market for all players!
-
The ability to set store names!
-
Support of our Dialogue system!
-
The possibility of endless store settings!
-
The ability to use the store only for certain jobs!
-
The ability to break the cash register to rob!
-
Robbery notifications for the police (You have to set your export or event)!
-
The ability of robbery only for certain jobs!
-
Random reward and time of cash register robbery!
-
Cooldown on the repeated robbery of the cash register for all players!
-
You can completely change the user interface at will!
-
Of course support, I’m ready to help you!
TOP SALES
You may also be interested in my other resources:
Code is accessible | Open source: Yes \ Escrow: No - Available only: config, function, ui |
Subscription-based | No |
Lines (approximately) | 1500+ |
Requirements | Standalone/ESX/QBCore |
Support | Yes |