ax.player.meta¶
Source: gamemode/modules/currencies/meta/sh_player.lua
Player meta extensions for currency management.
Documented functions: 10
Functions¶
player:AddCurrency(amount, uniqueID, bNoNetworking, recipients)player:AddMoney(amount, uniqueID, bNoNetworking, recipients)player:GetCurrency(amount, uniqueID)player:GetMoney(uniqueID)player:HasCurrency(amount, uniqueID)player:HasMoney(amount, uniqueID)player:SetCurrency(amount, uniqueID, bNoNetworking, recipients)player:SetMoney(amount, uniqueID, bNoNetworking, recipients)player:TakeCurrency(amount, uniqueID)player:TakeMoney(amount, uniqueID)
player:AddCurrency(amount, uniqueID, bNoNetworking, recipients)¶
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
uniqueID |
string |
The unique identifier of the currency (defaults to "dollars") |
Usage
player:AddMoney(amount, uniqueID, bNoNetworking, recipients)¶
Add dollars (alias for AddCurrency with "dollars").
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
amount |
number |
The amount to add |
bNoNetworking |
bool |
Optional flag to disable networking (server only) |
recipients |
table |
Optional specific recipients for networking (server only) |
Returns
number: The new total amount of dollars, or 0 if no character
Usage
player:GetCurrency(amount, uniqueID)¶
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
uniqueID |
string\|nil |
The unique identifier of the currency (defaults to "dollars") |
player:GetMoney(uniqueID)¶
Convenience aliases for the default "dollars" currency These methods forward to the character's money methods
Get dollars amount (alias for GetCurrency with "dollars").
Realm: shared
Returns
number: The amount of dollars, or 0 if no character
Usage
player:HasCurrency(amount, uniqueID)¶
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
uniqueID |
string |
The unique identifier of the currency (defaults to "dollars") |
Usage
player:HasMoney(amount, uniqueID)¶
Check if player's character has dollars (alias for HasCurrency with "dollars").
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
amount |
number |
The amount to check |
Returns
bool: True if the character has at least this amount, false otherwise
Usage
player:SetCurrency(amount, uniqueID, bNoNetworking, recipients)¶
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
uniqueID |
string |
The unique identifier of the currency (defaults to "dollars") |
Usage
player:SetMoney(amount, uniqueID, bNoNetworking, recipients)¶
Set dollars amount (alias for SetCurrency with "dollars").
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
amount |
number |
The amount to set |
bNoNetworking |
bool |
Optional flag to disable networking (server only) |
recipients |
table |
Optional specific recipients for networking (server only) |
Usage
player:TakeCurrency(amount, uniqueID)¶
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
uniqueID |
string |
The unique identifier of the currency (defaults to "dollars") |
Usage
player:TakeMoney(amount, uniqueID)¶
Remove dollars (alias for TakeCurrency with "dollars").
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
amount |
number |
The amount to remove |
Returns
bool: True if successful, false if no character or insufficient funds
Usage