i wanted to make Auto invite in my server so it would be better And i used that Code
But it doesnt work when the right time come it doesnt Appear but when i loging in that Time it appears what can i do to Avoid this or what makes it like that ...i need the invitation Sent to every online player when right time come not appear just for those who loggin in the right time
Code:
if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && (DateTime.Now.Hour == 15 && DateTime.Now.Minute <= 59))
{
client.OnMessageBoxOK = delegate
{
Network.GamePackets.Data data = new Network.GamePackets.Data(true);
data.UID = client.Entity.UID;
data.ID = Network.GamePackets.Data.OpenCustom;
data.dwParam = Network.GamePackets.Data.CustomCommands.Minimize;
client.Send(data);
client.Entity.Teleport(1002, 436, 240);
};
client.Send(new NpcReply(NpcReply.MessageBox, "Weekly Pk Tournament Starts Now.Would you like to join ?"));
}