time problem.

05/06/2013 20:47 Super Aids#16
Yeah or it would at least freeze the thread it's executed on, but much better than doing datetime checks.

Psudo:
Code:
static void Start()
{
	new System.Threading.Thread(Effect_Thread).Start();
}

static void Effect_Thread()
{
	while (true)
	{
		foreach (Client client in Clients)
		{
			if (client.Entity.Level == 140)
			{
				_String str = new _String(true);
				str.UID = client.Entity.UID;
				str.TextsCount = 1;
				str.Type = _String.Effect;
				str.Texts.Add("break_start");
				client.SendScreen(str, true);
	 		}
		}
		System.Threading.Thread.Sleep(5000);
	}
}
Keep in mind the collection should be thread-safe or it might cause problems...
05/06/2013 20:56 LordGragen.#17
thank you guys.