good morning
i am struggling to save to my config file i am still learming
i am trying to save the City_string to config could any one help please
i am struggling to save to my config file i am still learming
i am trying to save the City_string to config could any one help please
[ChatCommand("setcity")]
void set_city(BasePlayer player, string command, string[] args)
{
if (permission.UserHasPermission(player.userID.ToString(), "TeleportTown.set"))
{
Puts(player.displayName + " has set City at " + player.transform.position.ToString());
Vector3 citypocation = player.transform.position;
string City_string = JsonConvert.SerializeObject(citypocation);
SaveConfig();
Puts(City_string);
player.ChatMessage("City now Set To" + City_string);
}
else
{
player.ChatMessage("Your Not a Admin");
}
}config json
[JsonProperty("city")]
public List<string> citylocation { get; set; } = new List<string>();