Bool
::CM_ConfigManager.Create()
Creates a new configuration file with the specified values.
Parameters:
Type | Parameter | Information |
---|---|---|
string | FileFolder | The folder name |
string | FileName | The file name |
string | FileType | The type of the file (KeyValue, List, CVar) |
any | FileValue | The value to be added in the file |
Returns:
True if the file was created successfully, False otherwise.
Usage Examples:
::CM_ConfigManager.Create( "cm_config_manager", "config_manager_settings", "KeyValue", { IsEnabled = true } );
::CM_ConfigManager.Create( "cm_config_manager", "config_manager_players", "List", [ "Player1", "Player2" ] );
::CM_ConfigManager.Create( "cm_config_manager", "config_manager_enabled", "CVar", true );
Bool
::CM_ConfigManager.Update()
Updates an existing configuration file with the specified values.
Parameters:
Type | Parameter | Information |
---|---|---|
string | FileFolder | The folder name |
string | FileName | The file name |
string | FileType | The type of the file (KeyValue, List, CVar) |
string | FileOldValue | The old value to be searched into the file |
any | FileNewValue | The new value to replace the old value into the file |
Returns:
Returns True if the data was updated successfully, False otherwise.
Usage Examples:
::CM_ConfigManager.Update( "cm_config_manager", "config_manager_configs", "KeyValue", "IsAdminOnly", true );
::CM_ConfigManager.Update( "cm_config_manager", "config_manager_players", "List", "Player1", "PlayerOne" );
::CM_ConfigManager.Update( "cm_config_manager", "config_manager_enabled", "CVar", "", true );
Bool
::CM_ConfigManager.Add()
Adds new data to a configuration file.
Parameters:
Type | Parameter | Information |
---|---|---|
string | FileFolder | The folder name |
string | FileName | The file name |
string | FileType | The type of the file (KeyValue, List, CVar) |
any | FileValue | The value to be added to the file |
Returns:
Returns True if the data was added successfully, False otherwise.
Usage Examples:
::CM_ConfigManager.Add( "cm_config_manager", "config_manager_configs", "KeyValue", { IsAdminOnly = true } );
::CM_ConfigManager.Add( "cm_config_manager", "config_manager_players", "List", [ "Player1", "PlayerOne" ] );
::CM_ConfigManager.Add( "cm_config_manager", "config_manager_enabled", "CVar", true );
Bool
::CM_ConfigManager.Remove()
Removes data from a configuration file.
Parameters:
Type | Parameter | Information |
---|---|---|
string | FileFolder | The folder name |
string | FileName | The file name |
string | FileType | The type of the file (KeyValue, List, CVar) |
any | FileValue | The value to be removed from the file |
Returns:
Returns True if the data was removed successfully, False otherwise.
Usage Examples:
::CM_ConfigManager.Remove( "cm_config_manager", "config_manager_configs", "KeyValue", { IsAdminOnly = true } );
::CM_ConfigManager.Remove( "cm_config_manager", "config_manager_players", "List", [ "Player1", "PlayerOne" ] );
::CM_ConfigManager.Remove( "cm_config_manager", "config_manager_enabled", "CVar", "" );
Bool|Table
::CM_ConfigManager.Get()
Gets data from a configuration file.
Parameters:
Type | Parameter | Information |
---|---|---|
string | FileFolder | The folder name |
string | FileName | The file name |
string | FileType | The type of the file (KeyValue, List, CVar) |
any | FileValue | The value to be retrieved from the file |
Returns:
Returns a Table with the data if successful, False otherwise.
Usage Examples:
local IsAdminOnly = ::CM_ConfigManager.Get( "cm_config_manager", "config_manager_configs", "KeyValue", "IsAdminOnly" );
local PlayerOne = ::CM_ConfigManager.Get( "cm_config_manager", "config_manager_players", "List", "Player1" );
local IsEnabled = ::CM_ConfigManager.Get( "cm_config_manager", "config_manager_enabled", "CVar", "" );
local ConfigsTable = ::CM_ConfigManager.Get( "cm_config_manager", "config_manager_configs", "KeyValue", {} );
local PlayersList = ::CM_ConfigManager.Get( "cm_config_manager", "config_manager_players", "List", [] );