This is just a simple release for playerlimit.
can be done in many way, but this one is good.
if u are about to ask why i dont use world.h_chars.count,
then is because is not working. it will simply make server full when is online players are not eve 1% close to it XD
Im not going to release more anyway.
here is some of my trash.
anyways here it is.
in program.cs put:
Code:
public static int OnlinePlayers = 0;
Code:
Database.LoadLottoItems();
Code:
OnlinePlayers = 0;
Code:
if (PacketID == 1052)
{
try
{
ulong CryptoKey = BitConverter.ToUInt64(Data, 4);
AuthWorker.AuthInfo Info = (AuthWorker.AuthInfo)AuthWorker.KeyedClients[CryptoKey];
GC.AuthInfo = Info;
GC.MessageID = (uint)Rnd.Next(50000);
GC.Soc = StO.Sock;
Code:
if (Program.OnlinePlayers >= 100)//Change to the limit u want
{
GC.AddSend(Packets.SystemMessage(GC.MessageID, "Server is Full! Online Players: " + Program.OnlinePlayers + "/100."));
}
Code:
Program.OnlinePlayers += 1;
Code:
public void LogOff(bool Remove)
{
try
{
Code:
Program.OnlinePlayers -= 1;
Any problems let me know
if im right the OnlinePlayers thing will always stay alittle above then World.H_Chars.Count.






