Hello, at the begining i'm sorry for my bad english.
I'm making a small insim for me and my friend. I have a problem with listing players at server. I'm using lfs_external.
I can add player to list when he connecting, but i can't delete him when he left the server.
Here is a part of my code:
// A new client joined the server.
private void NCN_ClientJoinsHost(Packets.IS_NCN NCN)
{
AddToConnectionsList(NCN); // Update Connections[] list
//message from message.txt
List<string> list = new List<string>();
using (StreamReader reader = new StreamReader("message.txt"))
{
string line;
while ((line = reader.ReadLine()) != null)
{
InSim.Send_MTC_MessageToConnection(line, NCN.UCID, 0); // Show line
}
}
textBox2.Text += NCN.UName;
}
// A client left the server.
private void CNL_ClientLeavesHost(Packets.IS_CNL CNL)
{
RemoveFromConnectionsList(CNL.UCID); // Update Connections[] list
}
I don't know what to write in this case "// A client left the server." I'm trying a lot, but i'm a begginer at programing and i need help.
Kapsel (vego)
I'm making a small insim for me and my friend. I have a problem with listing players at server. I'm using lfs_external.
I can add player to list when he connecting, but i can't delete him when he left the server.
Here is a part of my code:
// A new client joined the server.
private void NCN_ClientJoinsHost(Packets.IS_NCN NCN)
{
AddToConnectionsList(NCN); // Update Connections[] list
//message from message.txt
List<string> list = new List<string>();
using (StreamReader reader = new StreamReader("message.txt"))
{
string line;
while ((line = reader.ReadLine()) != null)
{
InSim.Send_MTC_MessageToConnection(line, NCN.UCID, 0); // Show line
}
}
textBox2.Text += NCN.UName;
}
// A client left the server.
private void CNL_ClientLeavesHost(Packets.IS_CNL CNL)
{
RemoveFromConnectionsList(CNL.UCID); // Update Connections[] list
}
I don't know what to write in this case "// A client left the server." I'm trying a lot, but i'm a begginer at programing and i need help.
Kapsel (vego)