Highly advise having this setting turned on when trying to setup a new shop. VERY USEFUL
2. Initial Setup for a shop
Please note: These items were used as placeholders during development. The script is designed for you to set these items to be existing shop items within your server to provide your players with a unique experience. You only need to add these items if you do not want to set the config up yourself and instead want to use basic items that we used for testing. Please be aware these testing items with have no effects and that will need to be handled via another script.
['24/7 - Strawberry'] = {
welcomeMessage = 'Welcome to 24/7! - Where dreams come true!',
mainShopZone = { points = { vec3(33.8501, -1349.2050, 29.4970), vec3(23.2821, -1349.5566, 29.4970), vec3(23.9225, -1337.2926, 29.4970), vec3(34.0443, -1338.5358, 29.4970) } },
shopKeeper = { location = vec3(24.4608, -1347.2600, 28.4970), heading = 266.0, model = 'mp_m_shopkeep_01', label = 'Shop Keeper', netID = nil},
baskets = { location = vec3(30.88, -1348.46, 29.0), label = 'Grab/Return Basket', dimensions = { length = 0.5, width = 0.5, height = 1 } },
maxNoBasketItems = 3, -- amount of items you can add to your basket without having a basket prop in your hand
enabled = true, -- THIS LINE IS NEW IN 1.1.0 - set to false to disable the shop (useful if you want to temporarily disable a shop without deleting the whole shop and needed for DisableShop export)
blip = {
name = '24/7',
sprite = 59,
colour = 25,
scale = 0.8,
},
counter = {
location = vec3(24.8423, -1346.4615, 29.4970),
dimensions = { length = 1, width = 4.5, height = 1 },
distance = 1.2,
label = 'View Counter',
anims = {
checkedOut = {
dict = 'gestures@m@car@std@casual@ps',
anim = 'gesture_hello',
},
addCounterItem = {
dict = 'gestures@m@car@std@casual@ps',
anim = 'gesture_hand_left',
}
},
stock = {
paperbag = { label = 'Paper Bag', price = 2, quantity = 10, metadata = {} },
cigarettes_redwood = { label = 'Cigarettes', price = 10, quantity = 10, metadata = {} },
lighter = { label = 'Lighter', price = 10, quantity = 10, metadata = {} },
rolling_paper = { label = 'Rolling Paper', price = 5, quantity = 20, metadata = {} },
}
},
The blip is FULLY customisable to your likings and will stack with others that are the same name. example if you want all 24/7 shops to be the same use the same blip format over ALL of them.
Counter is for setting up your counter products that are set in the stock section above.
By default these are placeholder items make sure to change them to your own items within your city.
Each shelf has its own UNIQUE name. With Config.Debug turned on these can easily be seen and allow you to make minor adjustments to get them to position where you see fit. Good practice is to stand central to the position you are trying to use and to take your vec3 position from there.
4. Exports guide
The Envi-Shops resource provides several exports that allow other scripts to interact with the shop system. Below are the available exports and their usage: