public void create_property(Client player, PropertyTypes type) { var account = player.GetAccount(); if (account.AdminLevel >= 5) { var property = new Property(type, player.position, player.rotation, type.ToString()); ItemManager.SetDefaultPrices(property); property.Insert(); property.CreateProperty(); Properties.Add(property); API.SendChatMessageToPlayer(player, "You have sucessfully create a property of type " + type.ToString()); } }
private string Format(string key, PropertyTypes type) { var s = type == PropertyTypes.UnsignedInteger ? "unsigned integer" : type.ToString().Uncapitalize(); return($"Property '{key} = {map[key]}' is not a valid {s}."); }