Description: es_stockmarket adds a full featured stock trading app to your FiveM server. It fully intergrates with EssentialMode!
There’s also an API so you can add your own stocks to the app.
Installation
Download latest release
Make sure EssentialMode is up and running
Import es_stockmarket.sql into your database
Add ensure es_stockmarket to your configuration file for startup
Start your server
Ingame type /openstocks to open the window, you can intergrate this with anything of your choosing.
Developer information
To add a stock you can use the following event in your script: TriggerEvent("es_stockmarket:addStock", "Abbreviation", "Full name", baseWorth)
Parameter 1 and 2 are strings, the third is an integer what the “base” value is for the stock.
Server owner information
There are config options that are available for your configuration file. These are the following:
-- Time in MS to update the stock market prices
set es_stockmarket_pricingTimer 30000
-- The lowest possible randomizer
set es_stockmarket_minRandom 2
-- The highest possible randomizer
set es_stockmarket_maxRandom 20
-- The divider that is used to calculate the new prices
set es_stockmarket_divider 10
-- The lowest possible percentage of the base worth that the value of a stock can be
set es_stockmarket_lowestBasePercent 70
-- The highest possible percentage of the base worth that the value of a stock can be
set es_stockmarket_highestBasePercent 200
-- Sets whether or not you want to enable the 3 default stocks (GOO, FLC & BON)
set es_stockmarket_addDefault 1
Looks good - I got problems - Im not sure how to exports scripts and if thats the best way to do it performance wise? Im still new at developing in Fivem
I installed the script - But it will not let me buy or anything. I added the SQL file and have essentialmode running and everything. So I don’t know where I go wrong
Hey… I love the idea but can’t load the resource, I have this in console “Warning: Resource es_stockmarket does not specify an fx_version in fxmanifest.lua.”
Convar for enabling/disabling the default stocks ( set es_stockmarket_addDefault 1 )
@Worryinglamb08 Fixed @Geerdodagr8 this fixes that @MarkBurns Seems like some anti-virusses do this, MalwareBytes used to as well, I contacted MB to ask why, they removed my website from their blocklist. If you could ask Kaspersky, I’d appreciate it