v1.0.7
Added a new function that creates a config. Example of use:
using CounterStrikeSharp.API.Core;
using Modularity;
using VipCoreApi;
namespace TestConfig;
public class TestConfig: BasePlugin, IModulePlugin
{
public override string ModuleName { get; }
public override string ModuleVersion { get; }
private IVipCoreApi _api;
private TestConfig config;
public void LoadModule(IApiProvider provider)
{
_api = provider.Get<IVipCoreApi>();
//Write the title without the .json
config = _api.LoadConfig<TestConfig>("name_config"); // You can also specify the path with the 2nd argument, but it is not necessary. By default the path to modules will be
}
}
public class TestConfig
{
public int Test1 { get; set; } = 50;
public bool Test2 { get; set; } = true;
public string Test3 { get; set; } = "TEST";
public float Test4 { get; set; } = 30.0f;
}