mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
ox_core: Player tweaks, and docs for accounts
This commit is contained in:
1 parent
7f99ef97e1
commit
d21e19e9a3
4 files changed
+133
-28
No files matched your search
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Methods
|
||||
---
|
||||
|
||||
These functions are inherited by instances of CVehicle.
|
||||
|
||||
```lua
|
||||
local accounts = Ox.GetAccounts(owner)
|
||||
```
|
||||
|
||||
## accounts.get
|
||||
|
||||
Gets the current balance for an account.
|
||||
|
||||
```lua
|
||||
local account = 'fleeca'
|
||||
local balance = accounts.get(account)
|
||||
```
|
||||
|
||||
## accounts.set
|
||||
|
||||
Sets the balance of an account to the given amount.
|
||||
|
||||
```lua
|
||||
local account, newBalance = 'fleeca', 200
|
||||
accounts.set(account, newBalance)
|
||||
```
|
||||
|
||||
## accounts.add
|
||||
|
||||
Increases the balance of an account by the given amount.
|
||||
|
||||
```lua
|
||||
local account, amount = 'fleeca', 100
|
||||
accounts.add(account, amount)
|
||||
```
|
||||
|
||||
## accounts.remove
|
||||
|
||||
Decreases the balance of an account by the given amount.
|
||||
|
||||
```lua
|
||||
local account, amount = 'fleeca', 100
|
||||
accounts.remove(account, amount)
|
||||
```
|
||||
Reference in new issue
Block a user