A FiveM plugin
Based off of new_banking it is not a dependency but it is useful. (because it collaborates with it)
- FXServer
- Essentialmode
- es_extended (ESX)
- (optional new_banking)
It brings more jobs like Stockbroker.
Brings a new aspect to making money. By investing money into a company and after a time make a profit or loss.
This will be one of the fastest ways to make money if you do it well.
- MySQL
- Table
invest
:- Identifier (the id ESX gave to the user)
- Amount (how much did he/she invest?)
- Job (what is the job he/she invested in?)
- Rate (what was the current investment rate?)
- Active (is the investment still active?)
- Created (when was the investment made?)
- Add to table
jobs
:- investRate (what the current investment is on the job)
- Table
- Back-end
- server.lua
- use mysql-async to lay connection with database
- get the current invested balance from the user
- get the current available jobs from the database
- a loop that gives the job a new investment rate and says if it got up or down
- when stock is bought:
- check if user has amount on bank
- added into the
invest
table with all the information - remove invested money from users bank
- when stock is sold:
- currentRate(1.5%) - boughtRate(0.7%) = diffrenceRate(+0,8%)
- investment($200) + investment*(differenceRate) = newAmount($360)
- add newAmount to the users bank
- disable the investment
- client.lua
- NUI function so it can be send to the UI (job information or available jobs to invest in)
- notify when user is around blip that they can open the menu
- create blips from config file
- new_banking button callback
- UI bug fix (on resource stop
closeUI()
)
- server.lua
- Front-end
- Style
- Modern
- Sleek
- (Soft UI)
- Job list with table from what you can buy
- lots more but cba to write it out
- Style
- Download esx_invest
- Make sure you have the dependencies installed.
- Open the database.sql and start it in your database called
essentialmode
- Configure what you want in
config.lua
- Start the resource.
- Find the blip to open the menu (or install new_banking to open it in that menu. not currently supported)
- Start investing.
made by Tazio 2019 (finished it in 2020)