So i have it creating the datafile with..
how would i save playerID with timestamp to the datafile?Code:void Loaded() { permission.RegisterPermission("npctp.usecmd", this); data = Interface.GetMod().DataFileSystem.ReadObject<Data>("NpcTPdata"); LoadVariables(); } object GetConfig(string menu, string datavalue, object defaultValue) { var data = Config[menu] as Dictionary<string, object>; if (data == null) { data = new Dictionary<string, object>(); Config[menu] = data; Changed = true; } object value; if (!data.TryGetValue(datavalue, out value)) { value = defaultValue; data[datavalue] = value; Changed = true; } return value; }
Solved Help with datafile creation and saving
Discussion in 'Rust Development' started by Ts3hosting, Dec 17, 2016.