示例#1
0
        protected internal override void OnPurchase(Player p, string msg)
        {
            if (msg.Length == 0)
            {
                PlayerDB.SetLogoutMessage(p.name, "");
                p.Message("&aYour logout message was removed for free.");
                return;
            }

            if (!CheckPrice(p))
            {
                return;
            }
            if (msg == PlayerDB.GetLogoutMessage(p))
            {
                p.Message("&WYou already have that logout message."); return;
            }
            if (msg.Length > NetUtils.StringSize)
            {
                p.Message("&WLogin message must be 64 characters or less."); return;
            }

            if (!PlayerOperations.SetLogoutMessage(p, p.name, msg))
            {
                return;
            }
            Economy.MakePurchase(p, Price, "%3LogoutMessage: %f" + msg);
        }
示例#2
0
 protected override void SetPlayerData(Player p, string target, string msg)
 {
     PlayerOperations.SetLogoutMessage(p, target, msg);
 }