title: Adding a limit timer (Like can only be done/used every 24 hours)
body: <p>Code for a command for a private server for a game I am "developing".</p>
  
  <pre><code>internal class LotteryCommand : Command
  {
      public LotteryCommand()
          : base("lottery", 1)
      {
      }
      //lottery can be used once every 24h, just to attract users making them want to get on at least once a day!
      protected override bool Process(Player player, RealmTime time, string[] args)
      {
          Random rand = new Random();
  
          string name = player.Name;
  
          string lottonum = rand.Next(0, 100).ToString();
           //50 50 chance!
          if (int.Parse(lottonum) &gt; 49)
          {
              player.Manager.Database.DoActionAsync(db =&gt;
              {
                  player.Credits = db.UpdateCredit(player.Client.Account, +5000);
                  player.UpdateCount++;
  
              });
          }
          foreach (Client i in player.Manager.Clients.Values)
          {
              i.SendPacket(new TextPacket
              {
                  BubbleTime = 0,
                  Stars = -1,
                  Name = "Lottery - " + name,
                  Text = "rolled a " + lottonum
              });
          }
          return true;
      }
  }
  </code></pre>
  
  <p>can anyone tell me what to add if i wanted the command only to be used once per 24 hours?
  for those who cant tell/wanna know, its /lottery, and will say "Lottery - Player has rolled a #" and if the # is 50 or higher, the player who used the command will win 5k gold (credits) and if below, they dont win anything.
  i just want it to where it can only be used once every 24 hours.</p>