Page 1 of 1

Stats resetting

PostPosted: 18 Mar 2013, 01:10
by Jay53928
Everytime I log into my zombie survival, my stats reset, can someone help?

Re: Stats resetting

PostPosted: 18 Mar 2013, 04:28
by ismellike
dzienny wrote:You can use this command. Note that it has to be compiled in VS.

Code: Select all
//
// Coded by dzienny - 2013
//

using System;
using System.Data;
using System.Linq;

namespace MCDzienny
{
    public class CmdSql : Command
    {
        public override string name { get { return "sql"; } }
        public override string shortcut { get { return ""; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Nobody; } }

        public override void Use(Player p, string message)
        {
            DataTable queryResults = DBInterface.fillData(message, false);
            if (queryResults.Columns.Count == 0)
            {
                Player.SendMessage(p, "Query executed.");
                return;
            }
            if (queryResults.Rows.Count == 0)
            {
                Player.SendMessage(p, "No results found.");
                return;
            }

            // Display column names.
            string columnNames = String.Join(" | ", queryResults.Columns.Cast<DataColumn>().Select(c => c.ToString()).ToArray());
            Player.SendMessage(p, columnNames);

            // Display rows data.
            foreach (DataRow row in queryResults.Rows)
            {
                string rowItems = String.Join(" | ", row.ItemArray.Select(i => i.ToString()).ToArray());
                Player.SendMessage(p, rowItems);
            }

            queryResults.Dispose();
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/sql [query] - executes [query] on the server database.");
        }
    }
}


If you want to delete your record:
/sql DELETE FROM Players WHERE Name='Jay53928'


I will upload the dll for you.

www.mediafire.com/?2k544t45pm0kldm

Once you have that downloaded just move it into your extra>commands>dll folder

Then on your server do /cmdload sql

Then use this command-
/sql DELETE FROM Players WHERE Name='Jay53928'

*if your username isnt Jay53928 replace that^