X-twitter Instagram Discord Youtube
Gamerscord Logo
  • Home
  • FiveM
  • Pterodactyl
  • Minecraft
  • Discord
  • Partner ProgramPartner ProgramPartner Program
Font ResizerAa
GamerscordGamerscord
  • Home
  • FiveM
  • Pterodactyl
  • Minecraft
  • Discord
  • Partner ProgramPartner ProgramPartner Program
  • Home
  • FiveM
  • Pterodactyl
  • Minecraft
  • Discord
  • Partner ProgramPartner ProgramPartner Program
Gamerscord > FiveM > How to install Renewed Banking Script in FiveM
FiveM

How to install Renewed Banking Script in FiveM

Yuvraj Verma
Last updated: May 17, 2024 6:37 pm
By Yuvraj Verma - FiveM Content Writer
Share

Renewed Banking is feature-rich and free banking script developed and maintained by uShifty#1733. Inspired by the popular No Pixel server, this script offers a new banking system for FiveM, allowing players to enhance their role-playing experience. With Renewed Banking, you gain access to detailed transaction tracking and the ability to manage job accounts seamlessly.

Contents
DependenciesInstallation

Download Renewed-Banking: https://github.com/Renewed-Scripts/Renewed-Banking
QBCore Docs: https://docs.qbcore.org/qbcore-documentation/

Dependencies

  • Framework: QBCore/ESX
  • Oxmysql: https://github.com/overextended/oxmysql
  • Ox-lib: https://github.com/overextended/ox_lib
  • Ox-Target: https://github.com/overextended/ox_target
 

Installation

  • Once you have downloaded the required resources, navigate to your FiveM server’s resources folder. This folder is typically located in the server’s main directory.
  • Copy and paste the extracted folders/files of the downloaded resources (Renewed-Banking, oxmysql, ox_lib, and ox_target) into the resources folder of your FiveM server.
  • Ensure the scripts in the server.cfg

Replace the following QB-Management exports with Renewed Banking Exports

exports['qb-management']:GetAccount > exports['Renewed-Banking']:getAccountMoney
exports['qb-management']:AddMoney > exports['Renewed-Banking']:addAccountMoney
exports['qb-management']:RemoveMoney > exports['Renewed-Banking']:removeAccountMoney
exports['qb-management']:GetGangAccount > exports['Renewed-Banking']:getAccountMoney
exports['qb-management']:AddGangMoney > exports['Renewed-Banking']:addAccountMoney
exports['qb-management']:RemoveGangMoney > exports['Renewed-Banking']:removeAccountMoney

Handling the Transactions

To enable transaction functionality within the script, simply utilize the export exports[‘Renewed-Banking’]:handleTransaction at the desired locations in your code. It’s important to note that this export should only be used for bank transactions, as cash transactions should not be displayed in the banking system.

 

exports['Renewed-Banking']:handleTransaction(account, title, amount, message, issuer, receiver, type, transID)
--- @param account <string> - Job name or citizen ID
--- @param title <string> - Title of the transaction, e.g., "Personal Account / ${Player.PlayerData.citizenid}"
--- @param amount <number> - Amount of money being transacted
--- @param message <string> - Description of the transaction
--- @param issuer <string> - Name of the business or character issuing the bill
--- @param receiver <string> - Name of the business or character receiving the bill
--- @param type <string> - "deposit" or "withdraw"
--- @param transID <string> (optional) - Force a specific transaction ID instead of generating one
--- @return transaction <table> {
--- trans_id <string> - Transaction ID for the created transaction
--- amount <number> - Amount of money being transacted
--- trans_type <string> - "deposit" or "withdraw"
--- receiver <string> - Name of the business or character receiving the bill
--- message <string> - Description of the transaction
--- issuer <string> - Name of the business or character issuing the bill
--- time <number> - Epoch timestamp of the transaction
--- }

exports['Renewed-Banking']:getAccountMoney(account)
--- @param account <string> - Job Name or Custom Account Name
--- @return amount <number> - Amount of money the account has, or false if the account doesn't exist

exports['Renewed-Banking']:addAccountMoney(account, amount)
--- @param account <string> - Job Name or Custom Account Name
--- @param amount <number> - Amount of money being transacted
--- @return complete <boolean> - true if the transaction is completed successfully, false otherwise

exports['Renewed-Banking']:removeAccountMoney(account, amount)
--- @param account <string> - Job Name or Custom Account Name
--- @param amount <number> - Amount of money being transacted
--- @return complete <boolean> - true if the transaction is completed successfully, false otherwise

Example
Let’s consider the usage of the handleTransaction export within a paycheck function (QBCore/Server/Functions.lua) to display the transaction in the bank when a player receives their salary. Here’s a sample code snippet:

exports['Renewed-Banking']:handleTransaction(Player.PlayerData.citizenid, "Paycheck", payment, "Paycheck Received", Player.PlayerData.job.label, Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, "deposit")

In the above code, the handleTransaction export is used with specific parameters:

  • Player.PlayerData.citizenid represents the account (job or citizen ID) to which the transaction is associated.
  • "Paycheck" is set as the title for the transaction.
  • payment represents the amount being transacted, in this case, the player’s paycheck.
  • "Paycheck Received" serves as the description of the transaction.
  • Player.PlayerData.job.label represents the name of the business or character issuing the paycheck.
  • Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname represents the name of the character receiving the paycheck.
  • "deposit" indicates that it is a deposit transaction type.

Share This Article
Facebook X Flipboard Copy Link
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0

Stay Connected

FacebookLike
XFollow
YoutubeSubscribe
Google NewsFollow

Categories

News
1 Article

Must Read

Pterodactyl

How to update Ubuntu using command line interface

FiveM

zdiscord – A FiveM Discord Bot for QBCore Framework

Pterodactyl

How to Install Pterodactyl Panel?

FiveM

Generate a Key for Your FiveM Server in FiveM Keymaster

You Might also Like

FiveM

What is MLO in FiveM

FiveM

How to update txAdmin in Windows

FiveM

Grand Theft Auto in 2024: A Year of Anticipation and Surprises

FiveM

Setup a FiveM Server Status Bot with txAdmin

Gamerscord Logo

Gamerscord is the best source for game server development tutorials for FiveM, Minecraft, Pterodactyl, Discord, etc.

Mail: hello@gamerscord.com

Find Us on Socials

Copyright © 2024 Gamerscord. All rights reserved. Made with ❤️ in 🇮🇳
  • Privacy Policy
  • Expert Services
  • Partner Program
  • Contact
  • About Us
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?