Skip to content

Latest commit

 

History

History
67 lines (61 loc) · 2.88 KB

README.md

File metadata and controls

67 lines (61 loc) · 2.88 KB

esx_invest

A FiveM plugin
Based off of new_banking it is not a dependency but it is useful. (because it collaborates with it)

Dependencies

Why install this?

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.

TODO

  • 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)
  • 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())
  • Front-end
    • Style
      • Modern
      • Sleek
      • (Soft UI)
    • Job list with table from what you can buy
    • lots more but cba to write it out

Installation

  1. Download esx_invest
  2. Make sure you have the dependencies installed.
  3. Open the database.sql and start it in your database called essentialmode
  4. Configure what you want in config.lua
  5. Start the resource.
  6. Find the blip to open the menu (or install new_banking to open it in that menu. not currently supported)
  7. Start investing.

Credits

made by Tazio 2019 (finished it in 2020)