Hello this is what im using:

It works, i wonder if it is the right way to do it

Code:
/////////Checking account age///////////////////
            Account acct = killed.Account as Account;
           
            if (acct != null && killed.AccessLevel <= AccessLevel.Player)
            {
            TimeSpan ts = DateTime.Now - acct.Created;
           if (ts.TotalDays < 3)
          {       
          Console.WriteLine("That account is not old enough! "); ///<- just to make sure
            awardpoints = false;
           }
        }
 
            //////////////end of checking account age edit///////////////
Thanks!
 
That is correct, but one minor detail - use DateTime.UtcNow.
Account.Created is assigned DateTime.UtcNow, so if you use DateTime.Now, it won't compensate for the time zone difference and be off by N hours.
 
That is correct, but one minor detail - use DateTime.UtcNow.
Account.Created is assigned DateTime.UtcNow, so if you use DateTime.Now, it won't compensate for the time zone difference and be off by N hours.

I see, thanks for the reply.
 
Back