I got tierd of going into mysql to delete and make a new account so heres the code for it.
In Database.cs >>>External<<<
Find
above add
Next to add the commands.
in Client.cs
Find
Under it add
and so gms can delete players accounts.
Find
below add.
In Database.cs >>>External<<<
Find
Code:
public static void Ban(string Acc)
Code:
public static void delete(string Acc)
{//CreatedbyBloodBounty
if (ExternalDatabase.AllowQuerys)
DatabaseQueue.Enqueue(new MySqlCommand("DELETE FROM `Characters` WHERE `Account` = '" + Acc + "'", Connection));
DatabaseQueue.Enqueue(new MySqlCommand("UPDATE `Accounts` SET `LogonType` = 2 WHERE `AccountID` = '" + Acc + "'", Connection));
}
in Client.cs
Find
Code:
if (Message[0] == '/')
{
Code:
if (Message == "/delete")
{
ExternalDatabase.delete(MyChar.MyClient.Account);
MyChar.MyClient.Drop();
}
Find
Code:
if (Status == 8)
{
Code:
if (Splitter[0] == "/deleteban")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Char.Name == Splitter[1])
{
World.SendMsgToAll(Splitter[1] + " has been Deleted by " + MyChar.Name, "SYSTEM", 2011);
ExternalDatabase.delete(Char.MyClient.Account);
Char.MyClient.Drop();
}
else
{
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Sorry the Character:" + Splitter[1] + " is offline.", 2000));
}
}