🖥️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:

  1. FiveM server with administrator access

  2. Access to your server's database

  3. 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

  1. Download the banking script from your Keymaster.

  2. Extract the files to your resources (or any other preffered) folder.

  3. 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.

Ox Inventory Setup

Add the following item to your ox_inventory/data/items.lua

['bank_card'] = {
	label = 'Bank Card',
	weight = 50,
	stack = false,
	consume = 0
}

Codem Inventory, Jpr Inventory, PS Inventory, QB Inventory Setup

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'
}

QS Inventory & tgiann Inventory Setup

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

  1. Open config.lua file in the Banking Script folder

  2. Configure our script basing on your needs.

Step 6: Start using our script

  1. Save all changes

  2. Restart / Start your FiveM server

Enjoy using your brand new pScripts Banking script!

Last updated