🖥️Installation Guide
Banking Script Installation Guide
This page is dedicated to installation of our banking script. Follow steps listed below to start using pScripts Banking System on your server.
Prerequisities
Before you begin, ensure you have:
FiveM server with administrator access
Access to your server's database
File transfer capability (FTP or direct file access)
Step 1: Installing the dependencies
Our banking script requires 3 dependencies:
Additionaly, we recommend you use MariaDB as your Database Management System.
Step 2: Setting up the Database
For our script to work, you need to modify your database. Run these SQL commands:
CREATE TABLE `p_bank_accounts` (
`iban` varchar(20) NOT NULL,
`owner` varchar(46) DEFAULT NULL,
`name` varchar(60) NOT NULL,
`balance` int(11) NOT NULL DEFAULT 0,
`type` varchar(10) NOT NULL,
`credit_score` int(11) NOT NULL DEFAULT 0,
`users` longtext NOT NULL DEFAULT '[]',
`invoices` longtext NOT NULL DEFAULT '[]',
`transactions` longtext NOT NULL DEFAULT '[]',
`logs` longtext NOT NULL DEFAULT '[]'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `p_bank_cards` (
`id` int(11) NOT NULL,
`iban` varchar(30) NOT NULL,
`card_number` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `p_bank_loans` (
`id` int(11) NOT NULL,
`player` varchar(60) NOT NULL,
`name` varchar(40) NOT NULL,
`amount` int(11) NOT NULL,
`repayment` float NOT NULL,
`duration` bigint(30) NOT NULL,
`paid` int(11) NOT NULL DEFAULT 0,
`last_payment` bigint(30) NOT NULL,
`start_date` bigint(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `p_bank_accounts`
ADD PRIMARY KEY (`iban`);
ALTER TABLE `p_bank_cards`
ADD PRIMARY KEY (`id`);
ALTER TABLE `p_bank_loans`
ADD PRIMARY KEY (`id`);
ALTER TABLE `p_bank_cards`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `p_bank_loans`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
You can run these on your preferred Database Management Tool (ex. HeidiSQL, phpMyAdmin etc.)
Step 3: Downloading the Banking Script
Download the banking script from your Keymaster.
Extract the files to your resources (or any other preffered) folder.
Add the following line to your
server.cfg
ensure p_banking
Step 4: Setting up items
In our banking script we provide a bank card, that can be used to access ATM machines.
Add the following item to your ox_inventory/data/items.lua
['bank_card'] = {
label = 'Bank Card',
weight = 50,
stack = false,
consume = 0
}
Add the following item to your inventory items file
bank_card = {
name = 'bank_card',
label = 'Bank Card',
weight = 50,
unique = true,
usable = false,
image = 'bank_card.png'
}
Add the following item to your inventory items file
bank_card = {
name = 'bank_card',
label = 'Bank Card',
weight = 50,
unique = true,
usable = false,
image = 'bank_card.png',
type = 'item'
}
Adding item image
Place the bank_card.png
image in your inventory resource's image folder:
For ox_inventory:
ox_inventory/web/images/
For qb-inventory:
qb-inventory/html/images/
For ESX inventory: Check your specific inventory resource's image directory
For other inventories: Check your specific inventory resource's image directory
Step 5: Configuration
Open
config.lua
file in the Banking Script folderConfigure our script basing on your needs.
Step 6: Start using our script
Save all changes
Restart / Start your FiveM server
Enjoy using your brand new pScripts Banking script!
Last updated