FrameworkZ 10.8.3
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
PLAYER Class Reference

Player class for FrameworkZ. More...

Public Member Functions

mixed Destroy ()
 Destroys the player object.
 
void GenerateUID ()
 
void GetCharacter ()
 
void GetCharacterDataByID (characterID)
 
void GetCharacters ()
 
void GetCustomData ()
 
void GetIsoPlayer ()
 
void GetMaxCharacters ()
 
void GetPreviousCharacter ()
 
void GetRole ()
 
void GetSaveableData ()
 
table GetStoredData ()
 Gets the stored player mod data table. Used internally. Do not use this unless you know what you are doing. Updating data on the mod data will cause inconsistencies between the mod data and the FrameworkZ player object.
 
void GetUsername ()
 
void GetWhitelists ()
 
string Initialize ()
 Initializes the player object.
 
void InitializeDefaultFactionWhitelists ()
 
void IsWhitelisted (factionID)
 
void LoadCharacter (characterID)
 
integer PlayLocalSound (soundName)
 Plays a sound for the player that only they can hear.
 
void RestoreData (data)
 
boolean Save (shouldTransmit)
 Saves the player's data.
 
void SetCharacter (character)
 
void SetCharacters (characters)
 
void SetCustomData (customData)
 
void SetIsoPlayer (isoPlayer)
 
void SetMaxCharacters (maxCharacters)
 
void SetModel (characterData)
 
void SetPreviousCharacter (previousCharacter)
 
void SetRole (role)
 
void SetUsername (username)
 
void SetWhitelisted (factionID, whitelisted)
 
void SetWhitelists (whitelists)
 
void StopSound (soundNameOrID)
 Stops a sound for the player.
 
void ValidatePlayerData ()
 

Data Fields

PLAYER __index
 

Detailed Description

Player class for FrameworkZ.

Definition at line 112 of file Players.lua.

Member Function Documentation

◆ Destroy()

mixed Destroy ( )

Destroys the player object.

Returns
mixed of boolean Whether or not the player was successfully destroyed and string The message on success or failure.

◆ GenerateUID()

void GenerateUID ( )

◆ GetCharacter()

void GetCharacter ( )

◆ GetCharacterDataByID()

void GetCharacterDataByID ( characterID )

◆ GetCharacters()

void GetCharacters ( )

◆ GetCustomData()

void GetCustomData ( )

◆ GetIsoPlayer()

void GetIsoPlayer ( )

◆ GetMaxCharacters()

void GetMaxCharacters ( )

◆ GetPreviousCharacter()

void GetPreviousCharacter ( )

◆ GetRole()

void GetRole ( )

◆ GetSaveableData()

void GetSaveableData ( )

◆ GetStoredData()

table GetStoredData ( )

Gets the stored player mod data table. Used internally. Do not use this unless you know what you are doing. Updating data on the mod data will cause inconsistencies between the mod data and the FrameworkZ player object.

Returns
table The stored player mod data table.

◆ GetUsername()

void GetUsername ( )

◆ GetWhitelists()

void GetWhitelists ( )

◆ Initialize()

string Initialize ( )

Initializes the player object.

Returns
string The username of the player.

◆ InitializeDefaultFactionWhitelists()

void InitializeDefaultFactionWhitelists ( )

◆ IsWhitelisted()

void IsWhitelisted ( factionID )

◆ LoadCharacter()

void LoadCharacter ( characterID )

◆ PlayLocalSound()

integer PlayLocalSound ( soundName )

Plays a sound for the player that only they can hear.

Parameters
soundNamestring The name of the sound to play.
Returns
integer The sound's ID.

◆ RestoreData()

void RestoreData ( data )

◆ Save()

boolean Save ( shouldTransmit )

Saves the player's data.

Parameters
shouldTransmitboolean (Optional) Whether or not to transmit the player's data to the server.
Returns
boolean Whether or not the player was successfully saved.
Todo
Test if localized variable (playerData) maintains referential integrity for transmitModData() to work on it.

◆ SetCharacter()

void SetCharacter ( character )

◆ SetCharacters()

void SetCharacters ( characters )

◆ SetCustomData()

void SetCustomData ( customData )

◆ SetIsoPlayer()

void SetIsoPlayer ( isoPlayer )

◆ SetMaxCharacters()

void SetMaxCharacters ( maxCharacters )

◆ SetModel()

void SetModel ( characterData )

◆ SetPreviousCharacter()

void SetPreviousCharacter ( previousCharacter )

◆ SetRole()

void SetRole ( role )

◆ SetUsername()

void SetUsername ( username )

◆ SetWhitelisted()

void SetWhitelisted ( factionID ,
whitelisted  )

◆ SetWhitelists()

void SetWhitelists ( whitelists )

◆ StopSound()

void StopSound ( soundNameOrID )

Stops a sound for the player.

Parameters
soundNameOrIDmixed of string or integer The name or ID of the sound to stop.

◆ ValidatePlayerData()

void ValidatePlayerData ( )

Field Documentation

◆ __index

PLAYER __index

Definition at line 114 of file Players.lua.


The documentation for this class was generated from the following file: