I have a level system on my server , I want to add a title which shows Level Info to player title list .
I hope you understand me ..
Sorry for bad English.
 
What you want to do is add an entry to "public override void AddNameProperties(ObjectPropertyList list)" in PlayerMobile.cs.

Your entry might look something like this:

Code:
        public override void AddNameProperties(ObjectPropertyList list)
        {
            if (!Core.SA)
            {
                base.AddNameProperties(list);

                XmlPoints a = (XmlPoints)XmlAttach.FindAttachment(this, typeof(XmlPoints));

                XmlData XmlPointsTitle = (XmlData)XmlAttach.FindAttachment(this, typeof(XmlData), "XmlPointsTitle");

                if ((XmlPointsTitle != null && XmlPointsTitle.Data == "True") || a == null)
                {
                    return;
                }
                else if (IsPlayer())
                {
                    list.Add(1070722, "Kills {0} / Deaths {1} : Rank={2}", a.Kills, a.Deaths, a.Rank);
                }

                return;
            }
            // Start your custom stuff here:
            list.Add("Player Class: {0}", myCustomClass);
            list.Add("Player Level: {0}", myCustomLevel);
            list.Add("Total Experience: {0}", myCustomExperience);
           
            ... *SNIP* ...
 
Code:
  if(Egitmen)
            {
                list.Add("<BASEFONT COLOR = GREEN> EGİTMEN!");
            }

I added this code in GetProp.. void , but when I set true the Egitmen bool in the game this isn't work at the same time , I have to [save and log out and log in . Is it possible to make it quick?
 
in your Egitmen bool code, you should have this:

Code:
set { InvalidateProperties(); m_Egitmen = value; }
 
Now it's okey I dont have to log out/in but I have to tick true 2 times. Is it a bug or I did something wrong?
Also I have to false 2 times or it's not removing the title.
My codes :
This is in PlayerMobile/GetProperties
Code:
if(this.Egitmen == true)
            {
                list.Add("Hayvan Eğitmeni");
            }

This is my bool code:
Code:
 private bool m_Egitmen;

        [CommandProperty(AccessLevel.Administrator)]
        public bool Egitmen
        {
            get {  return m_Egitmen; }
            set {  InvalidateProperties(); m_Egitmen = value;  }
        }
upload_2017-3-6_18-49-54.png
 
You just need to reverse the order
set { m_Egitmen = value; InvalidateProperties(); }
 
Back