Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage authored May 23, 2024
1 parent 354423b commit 8620a07
Showing 1 changed file with 2 additions and 94 deletions.
96 changes: 2 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,99 +7,7 @@
- Auto creation of job/gang accounts on bank first open
- Boss-only access to job/gang accounts

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

### CreatePlayerAccount

Creates a new shared account for a player

```lua
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

```lua
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

```lua
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

```lua
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

```lua
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

```lua
GetAccount(
accountName, -- name of the account
)
```
### GetAccountBalance

Returns just the balance of the specified account by name

```lua
GetAccountBalance(
accountName, -- name of the account
)
```
### CreateBankStatement

This will create a statement for a specified account

```lua
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'
)
```
Documentation: https://docs.qbcore.org/qbcore-documentation/qbcore-resources/qb-banking

# License

Expand All @@ -117,4 +25,4 @@ This will create a statement for a specified account
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/>
along with this program. If not, see <https://www.gnu.org/licenses/>

0 comments on commit 8620a07

Please sign in to comment.