Configuration
Main Configuration
Config = {
Debug = false, -- debug mode for more information
VersionCheck = true, -- should this script check for a new version?
WebHook = 'https://ptb.discord.com/api/webhooks/', -- discord webhook
LeoJobs = {'police', 'cop', 'marshal'}, -- jobs that cant sell when illegal = true
DrawDistance = 30.0, -- distance marker should be drawn
DrawDistanceNPC = 100.0, -- distance ped should be drawn
InteractDistance = 1.8, -- distance you can access the markers
RefreshTime = 90 * 60 * 1000, -- refresh for prices (example given: 30 minutes)
RemainingTime = 0, -- do not change this
Chance = 20, -- change of double lose or gain
}
Enabling Debug can cause a higher resmon usage due to massive prints.
Translation Configuration
Translation = { -- Change the Translation Strings here
['webhook_username'] = 'STOCKMARKET',
['checker_noaccess'] = 'You ~r~do not~s~ have access to this monitor!',
['seller_policejob'] = '~r~You are working for the police, what are you doing?',
['seller_noaccess'] = 'You ~r~do not~s~ have access to this seller!',
['seller_noitem'] = '~r~You do not have any items that this seller wants.',
['seller_notenough'] = '~r~You do not have enough.',
}
Sound Configuration
This section is important and can be difficult for some people, if you need assistance don't hesitate to contact us on Discord!
We are going to tear down the whole "Points" Config into various blocks. Starting with the first block:
Points = {
{
name = 'food_market', -- intern script name (must be unique)
label = 'Press ~INPUT_CONTEXT~ to sell to the foodmarket.', -- label for the seller
infolabel = 'Press ~INPUT_CONTEXT~ to check foodprices.', -- label for the checker
css = 'sell', -- css from the esx_menu_default header
illegal = false, -- is this point illegal?
In the next block we are taking a look at the items:
items = {
{item = 'bread', label = 'Bread', minPrice = 5, maxPrice = 12},
{item = 'salmon', label = 'Lachs', minPrice = 8, maxPrice = 15},
{item = 'tomato', label = 'Tomato', minPrice = 2, maxPrice = 5},
{item = 'apple', label = 'Apple', minPrice = 4, maxPrice = 6},
{item = 'potato', label = 'Potato', minPrice = 3, maxPrice = 8},
},
In the next block we are configurating the checker:
checker = {
enable = true, -- enable/disable price checker?
whitelistJob = false, -- any job required for this point?
whitelistJobGrade = 0, -- if job required, what grade is minimum?
coords = vector3(1271.9380, -1712.0483, 54.7714), -- coords
marker = {
enable = true, -- enable/disable marker?
markertype = 29, -- markertype?
color = {r = 120, g = 255, b = 120} -- rgb color for marker?
},
blip = {
enable = false, -- enable/disable blip?
sprite = 434,
colour = 18,
size = 0.8,
text = 'Foodmarket Checker'
}
},
Next we are configurationg the seller:
seller = {
enable = true, -- enable / disable seller
whitelistJob = false, -- any job required for this point?
whitelistJobGrade = 0, -- if job required, what grade is minimum?
coords = vector3(2581.1616, 463.6486, 108.6083), -- coords
ped = {
enable = true, -- enable/disable ped?
model = 'csb_miguelmadrazo', -- Change this to the desired ped model
rotation = 171.1953 -- rotation of ped?
},
blip = {
enable = true, -- enable/disable blip?
sprite = 500,
colour = 69,
size = 0.7,
text = 'Foodmarket Seller'
}
}
}
And thats it! You now got a fully functional market ecosystem. You can add as many of them as you want.
IMPORTANT LIMITATION
You can put the same item in two different markets, but you can't give them different prices. If you still want to do that, we got a secondary table called "JobPoints". You can add a point in there with the same items as another market and can change the prices. So you basically can do 2 markets with the same items but different prices.
So we can say you CAN'T CREATE more than 2 MARKETS with the SAME ITEMS AND PRICE, please keep that in mind.
Last updated