[Release][Free][ESX] ESX Banker Job Upgraded

ESX Banker Job Upgraded [esx_bankerjob]

New Banker Job with functionalities such as loans, savings with custom rates, automated tasks, risked savings, inventory, company vehicles and so on…


[FEATURES]

  • Make loans and manage them from the office inside the Pacific Standard Bank

    • Powerful loan attribution system : Define the amount given, the rate, the amount of deadlines, the time between deadlines
    • Automatic loan management system : every morning at defined time in config.lua two cron tasks run :
        1. Countdown of the time remaining before a player must repay part of his loan
        1. Automatic payment if the deadline is met and if the user has enough money on his bank account otherwise the account is frozen
    • View all | the active | the frozen loans and manage them
  • Open savings accounts with a custom rate defined in percentages (1 - 100)

    • View the active and closed accounts and manage them
    • Automatic savings system : once a week on the day defined in config.lua a cron task runs calculating the interests
    • Choose if the money is generated or removed from the company bank account
  • Open risked savings accounts Feeling lucky ?

    • View the active and closed accounts and manage them
    • Automatic savings system : once a week on the day defined in config.lua a cron task runs calculating the interests
      • Custom rates : a custom rate that can be defined in the config.lua file is randomly chosen and applied to a risked savings account… living the life on the edge?
    • Choose if the money is generated or removed from the company bank account

[REQUIREMENTS]


[INSTALLATION]

  1. CD in your resources/[folderWhereYouWantTheScriptToBe]

  2. Clone the repository or download it via the link down below

git clone https://github.com/BenoursonJ/ESX-Banker-Job-Upgraded esx_bankerjob
  1. Import esx_bankerjob.sql in your database

  2. Configure the config.lua file (do not forget to modify the authorized vehicles)

  3. Modify the multiple “TriggerClientEvent('esx:showNotification” in server.lua to translate them to your liking.

  4. Add this in your server.cfg after cron, async, mysql-async and esx_society:

ensure esx_bankerjob

[GITHUB REPOSITORY + WIKI]

In need of info and troubleshooting tips ?

Github Repository page

Head to the Wiki => HERE


[SCREENSHOTS]

Click to view

Menu

View Savings accounts

View Risked Savings accounts

View all the loans

View active loans

###View frozen loans

View closed savings accounts

View closed risked savings accounts

Company Inventory

Vehicle spawning

Resources usage for normal player in the town center

Resources usage for banker inside the Pacific Standard Bank with all markers drawn

[UPCOMING AND PLANNED FEATURES]

  • Store items inside the vault

    • Accounts are opened and are unique to players
    • Accessing the vault is possible with a passcode
  • Link with a custom conveyor job

  • Much more to come !

[OTHER RELEASES]

If you have any feedback or ideas, please be sure to share them with us !

22 Likes

Nice! How many MS? (resmon)? Can you make a screenshot. Thankyou.

1 Like

Thanks ! I just updated the screenshots section with the screens of resources usage, check it out, thanks !

good job

1 Like

gave an error when trying to add the SQL file
below is where the errors started popping up error code blow that

CREATE TABLE bank_lent_money IF NOT EXISTS (
id int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
firstname varchar(255) DEFAULT NULL,
lastname varchar(255) NOT NULL,
clientID varchar(255) DEFAULT NULL,
amount double DEFAULT NULL,
rate double NOT NULL,
remainDeadlines double DEFAULT NULL,
deadlines double NOT NULL,
amountNextDeadline double DEFAULT NULL,
alreadyPaid double DEFAULT NULL,
timeLeft double NOT NULL,
timeBeforeDeadline double NOT NULL,
advisorFirstname varchar(255) DEFAULT NULL,
advisorLastname varchar(255) DEFAULT NULL,
status varchar(255) NOT NULL DEFAULT ‘Ouvert’
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS bank_savings (
id int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
firstname varchar(255) DEFAULT NULL,
lastname varchar(255) NOT NULL,
tot double DEFAULT NULL,
rate double NOT NULL,
advisorFirstname varchar(255) DEFAULT NULL,
advisorLastname varchar(255) DEFAULT NULL,
status varchar(255) NOT NULL DEFAULT ‘Ouvert’,
);

CREATE TABLE IF NOT EXISTS bank_riskedsavings (
id int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
firstname varchar(255) DEFAULT NULL,
lastname varchar(255) NOT NULL,
tot double DEFAULT NULL,
advisorFirstname varchar(255) DEFAULT NULL,
advisorLastname varchar(255) DEFAULT NULL,
status varchar(255) NOT NULL DEFAULT ‘Ouvert’,
PRIMARY KEY (id)
);

Static analysis:

4 errors were found during analysis.

An opening bracket was expected. (near "IF NOT EXISTS" at position 31)
At least one column definition was expected. (near " " at position 30)
Unexpected beginning of statement. (near "`id`" at position 50)
Unrecognized statement type. (near "int" at position 55)
SQL query:

CREATE TABLE `bank_lent_money` IF NOT EXISTS ( `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, `firstname` varchar(255) DEFAULT NULL, `lastname` varchar(255) NOT NULL, `clientID` varchar(255) DEFAULT NULL, `amount` double DEFAULT NULL, `rate` double NOT NULL, `remainDeadlines` double DEFAULT NULL, `deadlines` double NOT NULL, `amountNextDeadline` double DEFAULT NULL, `alreadyPaid` double DEFAULT NULL, `timeLeft` double NOT NULL, `timeBeforeDeadline` double NOT NULL, `advisorFirstname` varchar(255) DEFAULT NULL, `advisorLastname` varchar(255) DEFAULT NULL, `status` varchar(255) NOT NULL DEFAULT 'Ouvert' ) ENGINE=InnoDB DEFAULT CHARSET=latin1

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF NOT EXISTS (
  `id` int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
  `firs...' at line 1```
1 Like

try esx_bankerjob.sql (2.9 KB)

4 Likes

That is perfect thank you for the fast reply! city is growing and 2 nights ago I put the old bank job in hahah could not have happened at a better time thank you so much!!!

1 Like

Wow, can’t believe I messed up that hard such simple SQL queries, so sorry !
I will update the repository ASAP, thanks @HTMapping for giving a helping hand !

Surprisingly enough, my original queries work on Mysql 5.7.31 - MySQL Community Server

2 Likes

Looks fine, also I saw that you are changing the wait when it’s near to marker. Good job and keep doing free and good scripts for the community.

1 Like

Looks very awesome. :+1:

1 Like

Indeed ! Thanks for your contribution to the projects and the kind words !

1 Like

Really nice work :clap:

1 Like

Hi, is it normal for players who have a job grade below 4 unable to open the menu when they step into the blue circle? or is it something that I have to set myself?

Hi,
Make sure that the job grades defined for the job “banker” in your DB, table “job_grades” are right.
By default, ranks that are NOT conveyor or conveyor_boss can access the menus inside the bank.

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
	('banker',0,'conveyor','Convoyeur',60,'{}','{}'),
	('banker',1,'conveyor_boss','Resp. Convoyeur',70,'{}','{}'),
	('banker',2,'banker','Banquier',80,'{}','{}'),
	('banker',3,'advisor','Conseiller',90,'{}','{}'),
	('banker',4,'boss','PDG',100,'{}','{}')
;

Finally something good thanks for the release

1 Like

will this work with esx 1.2?

It has not been tested on esx 1.2 or 2.
If you wish to, you can test and give us a feedback :wink:

Create a stock trader job

1 Like

Nice Release !!

Hi. @JJameson I can’t seem to get it to work. I’m getting this error in the console but it’s so long, I can’t even read it all as it cuts off, so I can’t see what is wrong:

[MySQL] [ERROR] [esx_bankerjob] An error happens for query “INSERT INTO bank_savings(bank_savings.tot, bank_savings.rate, bank_savings.status) VALUES(?, ?, ?, ?, (SELECT FROM users WHERE users.identifier = ?), (SELECT FROM users WHERE users.identifier = ?), “Ouvert”); : [“Melissa”,“Wick”,10000,1,“steam:1100001357e5045”,“steam:1100001357e5045”]”: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘FROM users WHERE users.identifier = ‘steam:1100001357e5045’), (SELECT FROM `us’ at line 1

Are able to assist?