Git Product home page Git Product logo

qb-banking's Introduction

QB-Banking

Features

  • Handles all player interaction with bank/job/gang/shared accounts
  • ATM and bank card integration
  • Shared accounts between players
  • Auto creation of job/gang accounts on bank first open
  • Boss-only access to job/gang accounts

Exports

exports['qb-banking']:ExportName() -- replace export name with desired from below and needed arguments

CreatePlayerAccount

Creates a new shared account for a player

    CreatePlayerAccount(
        playerId, -- id of the player account is being created for
        accountName, -- name of the account, must be a string
        accountBalance, -- balance of the account on creation, must be a number
        json.encode({'LCC00307', 'LCC00308'}) -- table of users on account by citizenid
    )

CreateJobAccount

Creates a new job type account, this is automatically done so shouldn't need this

    CreateJobAccount(
        accountName, -- name of the account, must be a string
        accountBalance, -- balance of the account on creation, must be a number
    )

CreateGangAccount

Creates a new gang type account, this is automatically done so shouldn't need this

    CreateGangAccount(
        accountName, -- name of the account, must be a string
        accountBalance, -- balance of the account on creation, must be a number
    )

AddMoney

Adds money to an account by name, checks for regular account first If playerId is provided and a regular account isn't found then it will check for shared account

    AddMoney(
        accountName, -- name of the account, must be a string
        accountBalance, -- balance of the account on creation, must be a number
        reason -- optional, must be a string
    )

RemoveMoney

Removes money from an account by name, checks for regular account first If playerId is provided and a regular account isn't found then it will check for shared account

    RemoveMoney(
        accountName, -- name of the account, must be a string
        accountBalance, -- balance of the account on creation, must be a number
        reason -- optional, must be a string
    )

GetAccount

Returns all the information for the specified account by name

    GetAccount(
        accountName, -- name of the account
    )

GetAccountBalance

Returns just the balance of the specified account by name

    GetAccountBalance(
        accountName, -- name of the account
    )

CreateBankStatement

This will create a statement for a specified account

    CreateBankStatement(
        playerId, -- id of the player to create the statement for
        account, -- name of the shared account, must be a string
        amount, -- amount of the transaction, must be a number
        reason, -- reason for the transaction , must be a string
        statementType, -- type of statement, must be a string 'withdraw' or 'deposit'
        accountType -- type of account, must be a string 'player', 'shared', 'job', 'gang'
    )

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

qb-banking's People

Contributors

ghzgarage avatar evanillaa avatar backsh00ter avatar berkiebb avatar nylanderrdk avatar z3rio avatar citrattv avatar notaestheticallyducko avatar zfbx avatar alexandree5 avatar adamsimondev avatar s33g avatar tomboru avatar theilleniumstudios avatar flowdgodx avatar newtonzz avatar jay-fivem avatar mirrox1337 avatar nevaraven87 avatar aalbonn avatar dertweaky avatar tonybynmp4 avatar trclassic92 avatar swellington-soares avatar suelthedev avatar duboiss avatar tom-osborne avatar pride1922 avatar ansljeremy avatar holidayy95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.