What is RY-SHOPS?
A fully configurable shop system with a modern and simple design.
With the ease of creating infinite shops each with different items and options.
Config
RY = {}
RY.Options = {
FrameWork = 'esx', -- esx or qb
accountBlackMoney = 'black_money', -- account Name of Black Money
oxTarget = false, -- if false it will enable markers/3dtext
}
RY.Messages = {
purchaseCompleted = "Successfully Purchased (-%total%$), thank you!",
noMoney = "You don't have enought money (You need %total%$)"
}
RY.Locations = {
['shop1'] = {
shopName = 'SUPER MARKET',
useBlackMoney = false, -- if true player have to pay with black money.
menuCoords = vector3(25.63,-1347.48,29.48),
-- Categorys
categorysConfig = {'food', 'electronics', 'utilities'},
-- OxTarget
oxTargetConfig = {
icon = 'fa-solid fa-cube',
label = 'Shop',
},
-- Markers
markersConfig = {
markerMenu = {
useKey = 38, -- E
markerType = 2,
markerSize = {x = 0.3, y = 0.3, z = 0.3},
markerColor = {r = 255, g = 255, b = 255},
markerText = '[ ~g~E~w~ ] Shop'
},
},
-- Blips
blipsConfig = {
blipMenu = {
blipName = '24/7 Shop',
blipSprite = 59,
blipScale = 0.8,
blipColor = 2,
blipShow = true,
},
},
-- Shop Items
shopItems = {
[1] = {
itemName = "apple", -- item name in Database
itemLabel = "Apple", -- item lable to display in UI
itemImage = "apple.png", -- image in html/assets
itemPrice = 5, -- item price
itemCategory = 'food', -- item category
-- IMAGE RESOLUTION --
-- 150x100 Pixels --
-- IMAGE RESOLUTION --
},
[2] = {
itemName = "kiwi",
itemLabel = "Kiwi",
itemImage = "kiwi.png",
itemPrice = 2,
itemCategory = 'food',
},
[3] = {
itemName = "phone",
itemLabel = "Phone",
itemImage = "phone.png",
itemPrice = 100,
itemCategory = 'electronics',
},
[4] = {
itemName = "bandage",
itemLabel = "Bandage",
itemImage = "Bandage.png",
itemPrice = 25,
itemCategory = 'utilities',
},
}
},
['blackmarket'] = {
shopName = 'BLACK MARKET',
useBlackMoney = true,
menuCoords = vector3(-1.8970, -1400.0311, 29.2717),
-- Categorys
categorysConfig = {'ilegal'},
-- OxTarget
oxTargetConfig = {
icon = 'fa-solid fa-cube',
label = 'Black Market',
},
-- Markers
markersConfig = {
markerMenu = {
useKey = 38, -- E
markerType = 2,
markerSize = {x = 0.3, y = 0.3, z = 0.3},
markerColor = {r = 255, g = 255, b = 255},
markerText = '[ ~g~E~w~ ] BLACK MARKET'
},
},
-- Blips
blipsConfig = {
blipMenu = {
blipName = 'BLACK MARKET',
blipSprite = 59,
blipScale = 0.8,
blipColor = 2,
blipShow = false,
},
},
-- Shop Items
shopItems = {
[1] = {
itemName = "radio",
itemLabel = "Radio",
itemImage = "radio.png",
itemPrice = 250,
itemCategory = 'ilegal',
},
}
},
}
Updates - Latest 29/11/2023
UPDATE - 22/11/2023
- Code completely redone.
- Added support to ox-target.
- Added category System (each store has its categories).
- UI Redone, some changes and responsive resolutions.
UPDATE - 25/11/2023
- Added Search Input
- Added “Basket Empty” Message
- Fixed checkout function (was repeating it several times).
- Added %total% string in messages config, so you can use the total of the basket in the messages.
UPDATE - 27/11/2023
- Added Clear Basket Button.
- Added Green background to item total price to highlight more.
UPDATE - 28/11/2023
- Design of basket products reworked.
- Now each shop has its own oxTarget config.
- Added Black Market example in config.
UPDATE - 29/11/2023
-
Added BlackMoney option (Configurable for each store).
So Players can pay with blackmoney for blackmarket, for example. -
If the store has blackmoney activated, the item price style will turn red and the bank/cash buttons will be replaced by a blackmoney button.
Code is accessible | Yes |
Subscription-based | No |
Lines (approximately) | 1000 |
Requirements | ESX or QB |
Support | Yes |