[EssentialMode] es_stockmarket | Stock trading for EssentialMode!

EssentialMode Compatible

Name: es_stockmarket

Version: 1.0.3

Download: Release es_stockmarket 1.0.3 · kanersps/es_stockmarket · GitHub

Github(essentialmode): GitHub - kanersps/es_stockmarket

Contact: https://kanersps.pw/

Requirements:
MySQL-compat layer
([Release] EssentialMode base)

Description: es_stockmarket adds a full featured stock trading app to your FiveM server. It fully intergrates with EssentialMode! :slight_smile:

There’s also an API so you can add your own stocks to the app.

Installation

  1. Download latest release
  2. Make sure EssentialMode is up and running
  3. Import es_stockmarket.sql into your database
  4. Add ensure es_stockmarket to your configuration file for startup
  5. Start your server :slight_smile:

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

Screenshots

31 Likes

I think yes

1 Like

Good work

1 Like

FUCK this is sick… Good work!

2 Likes

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

Could you explain in detail what you’re trying to accomplish?

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

Do you have any console output

No errors or anything which is kinda wierd.

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.”

That’s odd, the fxmanifast.lua does provide a fx_version parameter. Could you check your local version.

You can create scripts.
That can allow players to bring items to sell
And other players can buy

Can you do it

This is an example

Hi, great script but I’m having some trouble adding new stocks.

I added:
2020-04-15_22h51_11

I got this error on the console:

Line 65 on mine is:

How can i solve this?

Would you mind waiting until tomorrow? I’ll debug this once i wake up. That’s about 12~ hours from now

Don’t mind at all, will wait for your response.

thats auction house?

having the same issue as well

this is global market right ?

By the way, something off-topic.

My antivirus blocked your website, i also get a kaspersky notification when running locally a server using one of your scripts.

No worries though, just wondering. Thanks for all the work you do!

Version 1.0.1

(https://github.com/kanersps/es_stockmarket/releases/tag/1.0.1)

  • Fixes for multiple stocks
  • Convar for enabling/disabling the default stocks ( set es_stockmarket_addDefault 1 )

@Worryinglamb08 Fixed :slight_smile:
@Geerdodagr8 this fixes that :slight_smile:
@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 :slight_smile:

1 Like