[Discontinued] Simple Banking 2.0 - Now with GUI

Simple Banking

#THIS IS NO LONGER BEING UPDATED, SEE 3.1.0 PORT BELOW
#[Release] [ES] Simple Banking port to 3.1.0
Simple banking is a script that allows you to include a banking system in your server. This system uses
EssentialMode cash, and a seperate bank balance field in the database, to allow the player to seperate ‘on-character’ cash from that stored safely away!

Why is it called Simple Banking?

It’s called ‘Simple Banking’ as it is aimed at making life simpler for the server owners and developers. It is/will not be ‘simple’ in terms of features. I aim to make it an even more in-depth and comprehensive money system, while keeping it ‘Simple’ for the end users.

Now with GUI!

https://forum.fivem.net/uploads/default/original/2X/8/8ffa0fcd5e11e2a61fc0794e2da4a84d727e32a3.gif

This is the initial version, changes are likely to happen.

Requires EssentialMode
Works best with es_freeroam but not required

Features

  • Full GUI for banks and ATMs
  • Show bank balance and bank transactions on HUD
  • Stores bank cash seperately
  • Limit giving cash to nearby player
  • 70 ATM Locations
  • 7 Bank Locations
  • Withdraw cash from ATM
  • Withdraw cash from bank
  • Deposit cash at bank
  • Transfer to another persons bank account
  • Check available balance
  • Customisable Settings

Install

  • Download simple banking
  • Put ‘banking’ folder into your servers ‘resources’ folder
  • Add ‘- banking’ to AutoStartResources in citmp-server.yml
  • Import ‘db.sql’ into EssentialMode database
  • Change database settings on line 2 of server.lua
  • Personalise your settings in client.lua
  • Start / Restart server

GUI Usage

Press the Context Action key (Default: E) when near an ATM or in a bank.

Usage

/checkbalance

Example: /checkbalance

Returns the players current account balance.By default can be used anywhere (like using a mobile app)

/withdraw [amount]

Example: /withdraw 50

Withdraws the specified amount from the players bank account. By default can only be used at ATMs or
banks.

/deposit [amount]

Example: /deposit 50

Deposits the specified amount from the players bank account. By default can only be used inside banks.

/transfer [id] [amount]

Example: /transfer 17 2000

Transfers money from the players bank account to the recipients bank account. By default can be used anywhere (like using a mobile app)

/givecash [id] [amount]

Example: /givecash 17 20

Transfers money from the players wallet to the recipients wallet. By default can be used anywhere
as long as the recipient is within 5 Meters

Settings

All settings are customisable in the client.lua file.

depositAtATM (Default: false)

Allows the player to deposit cash at ATMs. By default cash can only deposited in store at one of
the six bank locations.

giveCashAnywhere (Default: false)

Allows the player to give cash no matter how far away the other player is. By default the recipient
has to be nearby (5 Meters). This behaves similar to the bank transfer but for ‘on-character’ cash.

withdrawAnywhere (Default: false)

Allows the player to withdraw cash no matter where they are. By default the player can only withdraw
cash from ATMs or in Banks.

depositAnywhere (Default: false)

Similar to the withdrawAnywhere setting. This option allows players to deposit cash into their bank
account from anywhere. By default the player must be in 1 of the 6 bank stores.

displayBankBlips (Default: true)

Displays the locations of banks on the map. Default to show markers on map.

displayAtmBlips (Default: false)

Displays the locations of atms on the map. Default to hide markers on map. I do not recommend using this
option it is very ugly and clutters the map. Some icons overlap because some locations have more than one atm.

Changelog

18/04/17 17:00 V1.01 - Setting to turn blips on or off, added missing bank
19/04/17 07:00 V1.02 - Fixed issues with givecash
19/04/17 08:00 V1.02a - Fixed isues with transfer
19/04/17 12:00 V1.03 - Added HUD to show bank balance and bank transactions
21/04/17 02:30 V2.0 - GUI Update
21/04/17 23:00 V2.01 - Fixed transfer issue and being able to fire while in GUI
22/04/17 13:00 V2.02 - Can no longer access bank or ATM in a vehicle
Added 2 missing ATMs
23/04/17 16:00 -
Bug Fixes:
- Issue where user could use decimals
- Issue where user could exploit by using extra large number
- Issue where user could use negative numbers

No Longer Being Updated

33 Likes

Any feature requests please let me know.

Questions:
Q:Blips aren’t displayed, is this intentional?
A:Yes, there would be over 70 blips on the map, and I don’t want to clog it up with so many. UPDATE: as of 1.01 there is now an option in client.lua to enable them.

Q: Will you implement a menu-based system?
A: Yes - Completed

Q: Could you add a method that charges the player on death?
A: Yes, I could. I most likely won’t. I think that should be kept separate and added uniquely to your servers death/respawn events.

Q: Will you add an on screen display for bank balance?
A: Yes - Completed

1 Like

Don’t put the rob feture in i want to put this in my server and i dont want people getting robed like there money gets taken just the alarm is set off and the cops can respond.

Yeah I wasn’t 100% on the rob idea, I might keep this project completely economy focused and build a separate resource for robbing of stores, banks, players, vans, businesses, etc.

1 Like

@GBJoel Very good job well done to you. On the other hand, small concerns I think, the markers indicating the cash dispensers on the map do not appear. An idea of ​​where can the worry come from?

very good job gbjoel :wink:

Maybe have a menu when we are in front of the ATM or the bank and on his menu have withdraw etc…
To don"t have commands just a menu :smiley:

1 Like

Thanks for this ! Could you add or change value like, if we have money on characther, and we die, we loose this money ?

And maybe have like the dollars in the right corner, an icone with the balance account can be great to know the money all the time and not to do /checkbalance
It can be great :smiley:

2 Likes

Nice job man! have very nice day <3

My advice is YES keep the banking system separated from any other gameplay feature.

On the UI side

A simple menu like ->
-> Withdraw Money
-> 5000
-> 10000
-> …
-> ALL
-> Deposit Money
-> 5000
-> 10000
-> …
-> ALL

  • Displaying Account balance on top right below cash money

Would be great ! Anyway thanks for this, I’ll see tonight if I can fork and eventually give a try on implementing it.

6 Likes

Genius :slight_smile: Thank you GBjoel :slight_smile:

Like others I am for a menu instead of chat commands :slight_smile: (In front of the ATMS and Banks would be nice :slight_smile: Maybe it could help with your future idea to create a robbing bank system ;))

Screenshot of a french server where code is NOT shared (thanks to them clap clap)…

You can withdraw defined amount like 5k, 10k, etc… and ALL
You can deposit by entering amount in a poping text box and then typing entry

6 Likes

Great job!
This sharing makes a well-played FiveM strength.

ATM and BANK markers are not screws

Thank you for the share, even if it give me mixed feelings…

From a first point of view, it is really nice to share what you have done, it will me usefull to many people !
But too many people try to open a server without any knowlegde in development, and this type of share will allow them to create “good looking” servers even if they have no clue how you created the script…

3 Likes

thx for this script dude very nice

Since you created that post:

I guess you made the code for everything that was on it ?
Opensourcing IS important.

3 Likes

Think that everyone would be able to open a server Vanyangel. The share of the community is so important. Maybe some would learn Lua scripting with the shares and releases. We don’t have to be selfish, on internet, like in real life. Think that Knowledge have to be universal and for Everyone.

Thanks for all the scripters and those who share with us their work. Really appreciate it.

3 Likes

You say so true scapin

1 Like

@GBJoel

Some indent issues on the last handler, but reading your code is a pleasure.

1 Like