public override void Use(Player p, string message) { Player proposer = MarryPlugin.CheckProposal(p); if (proposer == null) { return; } const string msg = "-λNICK &Sdenied {0}&S's proposal, it just wasn't meant to be-"; Chat.MessageFrom(p, string.Format(msg, p.FormatNick(proposer))); p.Message("&bYou &cdenied &b{0}&b's proposal", p.FormatNick(proposer)); p.Extras.Remove(MarryPlugin.EXTRA_KEY); }
public override void Use(Player p, string message) { Player proposer = MarryPlugin.CheckProposal(p); if (proposer == null) { return; } const string msg = "-λNICK &aaccepted {0}&S's proposal, and they are now happily married-"; Chat.MessageFrom(p, string.Format(msg, p.FormatNick(proposer))); p.Message("&bYou &aaccepted &b{0}&b's proposal", p.FormatNick(proposer)); proposer.SetMoney(proposer.money - 200); MarryPlugin.marriages.Update(p.name, proposer.name); MarryPlugin.marriages.Update(proposer.name, p.name); MarryPlugin.marriages.Save(); p.Extras.Remove(MarryPlugin.EXTRA_KEY); }