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 "default") |
Usage
player:AddMoney(amount, uniqueID, bNoNetworking, recipients)¶
Add default (alias for AddCurrency with "default").
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 default, 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 "default") |
player:GetMoney(uniqueID)¶
Convenience aliases for the default "default" currency
These methods forward to the character's money methods
Get default amount (alias for GetCurrency with "default").
Realm: shared
Returns
number: The amount of default, 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 "default") |
Usage
player:HasMoney(amount, uniqueID)¶
Check if player's character has default (alias for HasCurrency with "default").
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 "default") |
Usage
player:SetMoney(amount, uniqueID, bNoNetworking, recipients)¶
Set default amount (alias for SetCurrency with "default").
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 "default") |
Usage
player:TakeMoney(amount, uniqueID)¶
Remove default (alias for TakeCurrency with "default").
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