Character class for FrameworkZ.
More...
Character class for FrameworkZ.
Definition at line 827 of file Characters.lua.
◆ AddRecognition()
void AddRecognition |
( |
character | , |
|
|
alias | ) |
◆ Destroy()
Destroy a character. This will remove the character from the list of characters and is usually called after a player has disconnected.
◆ GetRecognition()
void GetRecognition |
( |
character | | ) |
|
◆ GetSaveableData()
◆ GiveItem()
Give a character an item.
- Parameters
-
uniqueID | string The ID of the item to give. |
- Returns
- boolean Whether or not the item was successfully given.
◆ GiveItems()
Give a character items by the specified amount.
- Parameters
-
itemID | string The ID of the item to give. |
amount | integer The amount of the item to give. |
◆ Initialize()
Initialize a character.
- Returns
- string username
◆ InitializeDefaultItems()
void InitializeDefaultItems |
( |
| ) |
|
Initialize the default items for a character based on their faction. Called when FZ_CHAR mod data is first created.
◆ IsCitizen()
Checks if a character is a citizen.
- Returns
- boolean Whether or not the character is a citizen.
◆ IsCombine()
Checks if a character is a combine.
- Returns
- boolean Whether or not the character is a combine.
◆ OnLoad()
◆ OnPostLoad()
void OnPostLoad |
( |
firstLoad | | ) |
|
◆ OnPreLoad()
◆ RecognizesCharacter()
void RecognizesCharacter |
( |
character | | ) |
|
◆ RestoreData()
◆ Save()
boolean Save |
( |
shouldTransmit | | ) |
|
Save the character's data from the character object.
- Parameters
-
shouldTransmit | boolean (Optional) Whether or not to transmit the character's data to the server. |
- Returns
- boolean Whether or not the character was successfully saved.
◆ SetUID()
◆ TakeItem()
Take an item from a character's inventory.
- Parameters
-
uniqueID | string The unique ID of the item to take. |
- Returns
- boolean string Whether or not the item was successfully taken and the success or failure message.
◆ TakeItemByInstanceID()
Take an item from a character's inventory by its instance ID. Useful for taking a specific item from a stack.
- Parameters
-
instanceID | integer The instance ID of the item to take. |
- Returns
- boolean string Whether or not the item was successfully taken and the success or failure message.
◆ TakeItems()
◆ __index
The documentation for this class was generated from the following file: