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.',}
You can change this into any language you'd like.
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?
The variable "name": is your unique name, it will be used as a "database" for intern operations. In this example its "food_market".
The variable "css": is used to change the header of the menu.
The variable "illegal": can either be true/false. If it's set to true the Jobs from the Table "LeoJobs" that you have set in the Main Configuration are not able to sell items at the specific market.
In the next block we are taking a look at the items:
We got a list for every item that should be accepted by the market and be shown in the checkmenu.
The variable "item": Is your item name set in your inventory. That name is also used for the image in the UI.
The variable "label": This is the text that will be shown in the UI.
The variables "minPrice" & "maxPrice": You can set a minimum price and a maximum price, every set time, the prices will change to a value between those.
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' } },
We can enable or disable the price checker in here.
The variable "whitelistJob": You can set a job that is required to access that price checker. If you do not want to set a job put it as "false".
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' } }}
We can enable or disable the seller in here.
The variable "whitelistJob": You can set a job that is required to access that price checker. If you do not want to set a job put it as "false".
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.