in this release im going to share a simple code called [tag]. eg. when a player reach VIP LV 1-6 i prefer 5 gets a [VIP] tag in the left or right side of their name. whatever.
paste this in your entity.cs or character.cs
paste this in your Program.cs this is for the GMs && PMs tag
This is the VIP tag paste this in your program.cs
paste this in your entity.cs or character.cs
Code:
public void viptag(string oldName, string newName)
{
new Database.MySqlCommand(Database.MySqlCommandType.UPDATE).Update("entities").Set(oldName, newName).Where("UID", UID).Execute();
}
Code:
#region PMtag
if ((int)client.Account.State == 4)
{
if (!client.Entity.Name.Contains("[PM]"))
{
if (!(client.Entity.Name.Length >= 15))
{
client.Entity.viptag("Name", "[PM]" + client.Entity.Name);
client.Disconnect();
}
else
{
client.Entity.Name.Substring(0, 10);
client.Entity.viptag("Name", "[PM]" + client.Entity.Name);
client.Disconnect();
}
}
}
else
{
if (client.Entity.Name.Contains("[PM]"))
{
string viptag = client.Entity.Name;
viptag = viptag.Replace("[PM]", "");
client.Entity.viptag("Name", viptag);
client.Disconnect();
}
}
#endregion PMtag
Code:
#region VIP
if (client.Entity.VIPLevel > 4 && (int)client.Account.State != 4)
{
if (!client.Entity.Name.Contains("[VIP]"))
{
if (!(client.Entity.Name.Length >= 15))
{
client.Entity.viptag("Name", "[VIP]" + client.Entity.Name);
client.Disconnect();
}
else
{
client.Entity.Name.Substring(0, 10);
client.Entity.viptag("Name", "[VIP]" + client.Entity.Name );
client.Disconnect();
}
}
}
else if ((int)client.Account.State == 4)
{
if (client.Entity.Name.Contains("[VIP]") && !client.Entity.Name.Contains("[PM]") && !(client.Entity.Name.Length >= 15))
{
string viptag = client.Entity.Name;
viptag = viptag.Replace("[VIP]", "");
client.Entity.viptag("Name", viptag);
client.Disconnect();
}
}
else if (client.Entity.VIPLevel < 5)
{
if (client.Entity.Name.Contains("[VIP]"))
{
string viptag = client.Entity.Name;
viptag = viptag.Replace("[VIP]", "");
client.Entity.viptag("Name", viptag);
client.Disconnect();
}
}
#endregion VIP
BTW if youre wondering why not just combine the codes together. answer is i tried combining it but i get alot of conflicts i dunno y. if you guys figured that out post it here so everyone will know especially me
and one last thing the "oldName" && "newName" is the thing when you change your name in namechanger in the game.






