I would like to check if the file example.json exists in data/{Name}/commands/ .
Is it possible? I tried two times but noone is working...
Is it possible? I tried two times but noone is working...
void OnUserGroupAdded(string player, string groupName)
{
if (Interface.Oxide.DataFileSystem.ExistsDatafile($"{Name}/commands/{groupName}") == true)
{
Puts("Exist!");
}
else
{
Puts("NO!");
}
}CommandsPluginData commandsDataFile;
class CommandsPluginData
{
public int inventorySlotsNeeded;
public List<string> commands = new List<string>();
}
void OnUserGroupAdded(string player, string groupName)
{
try
{
commandsDataFile = Interface.Oxide.DataFileSystem.ReadObject<CommandsPluginData>($"{Name}/commands/{groupName}");
}
catch (Exception e)
{
PrintError(e.ToString());
}
}