The online racing simulator
[HELP] Nickname in msg
(15 posts, started )
[HELP] Nickname in msg
Hi, I'm a little new in this use of Visual Studio...

My question is how to make when a user uses the command! Sem show a message that says "The user 'username' has activated the command"

Here is the part of the code! Sem and I would like you to add the part I need, thank you very much!

https://pastebin.com/rSyw7xqz
Paste MsgAll(Conn.Username + " ^7has activated !sem."); after Connections[GetConnIdx(MSO.UCID)].DragStage = 1;
Quote from NakaTech :Hi, I'm a little new in this use of Visual Studio...

My question is how to make when a user uses the command! Sem show a message that says "The user 'username' has activated the command"

Here is the part of the code! Sem and I would like you to add the part I need, thank you very much!

https://pastebin.com/rSyw7xqz

I can help you, i speak portuguese, is more or less equal to Spanish, add me on facebook:
https://www.facebook.com/Eduar5do

And responsed you: Dont use LFS_External, use InSim.NET is better, and not is limited, if you need create semaphores system, you can use InSim.NET, talk-me in facebook, i send for you my project, cruise project, but i can modify for you for you create your project.
Quote from Getaway Driver2121 :I can help you, i speak portuguese, is more or less equal to Spanish, add me on facebook:
https://www.facebook.com/Eduar5do

And responsed you: Dont use LFS_External, use InSim.NET is better, and not is limited, if you need create semaphores system, you can use InSim.NET, talk-me in facebook, i send for you my project, cruise project, but i can modify for you for you create your project.

Olá, enviei-lhe uma mensagem no Facebook
Quote from crazyboy232 :Paste MsgAll(Conn.Username + " ^7has activated !sem."); after Connections[GetConnIdx(MSO.UCID)].DragStage = 1;

Thanks, but it did not work
Quote from Getaway Driver2121 :I can help you, i speak portuguese, is more or less equal to Spanish, add me on facebook:
https://www.facebook.com/Eduar5do

And responsed you: Dont use LFS_External, use InSim.NET is better, and not is limited, if you need create semaphores system, you can use InSim.NET, talk-me in facebook, i send for you my project, cruise project, but i can modify for you for you create your project.

liar to me help backwards in the told codes ı send again to me message
he didn't send
Quote from Getaway Driver2121 :I can help you, i speak portuguese, is more or less equal to Spanish, add me on facebook:
https://www.facebook.com/Eduar5do

And responsed you: Dont use LFS_External, use InSim.NET is better, and not is limited, if you need create semaphores system, you can use InSim.NET, talk-me in facebook, i send for you my project, cruise project, but i can modify for you for you create your project.

completely LİAR
In general it’s considered poor form to call someone a liar. It makes other less likely to help you.
I could not finish this, I'm still waiting for help.
Quote from NakaTech :I could not finish this, I'm still waiting for help.

maybe try to explain what the problem is in more detail ?
Quote from THE WIZARD DK :maybe try to explain what the problem is in more detail ?

ADD nickname to MSG

Functions.MsgToCnx("^3Bienvenido " + Conn.Username + " al servidor.", mso.UCID);

MsgToCnx function:

public static void MsgToCnx(string Message, byte ConnectionID)
{
Program.insim.Send(new IS_MTC{ Msg = Message, UCID = ConnectionID, ReqI = 255 });
}
Just think of where you could grab such value. The IS_NCN packet should do the trick, grab the PName value and save it somewhere easily accessible.

eg: Have a dictionary of connections, and a dictionary of players. Save the value to the connections dictionary, that way you can have a list of vars you can use at any time by calling connections.variable.

For the players, you can add a player when they leave the pits and remove one when they spectate or leave. If you count the players dictionary, you can see how many players are on the track.

That should cover most of it, good luck.
Quote from kristofferandersen :Just think of where you could grab such value. The IS_NCN packet should do the trick, grab the PName value and save it somewhere easily accessible.

eg: Have a dictionary of connections, and a dictionary of players. Save the value to the connections dictionary, that way you can have a list of vars you can use at any time by calling connections.variable.

For the players, you can add a player when they leave the pits and remove one when they spectate or leave. If you count the players dictionary, you can see how many players are on the track.

That should cover most of it, good luck.

Thanks, I have another problem ... I would like that when a user enters node 56 of the Blacwood BL2 track he is sent to the pits, I do not understand what is wrong with my code.

void MCI_Handler(Packets.IS_MCI MCI)
{
for (int n = 0; n < MCI.NumC; n++)
{
if (MCI.Info[n].Node == 56)
{
foreach (clsPlayer Player in Players)
{
if (Player.PlayerID == MCI.Info[n].PLID)
{
foreach (clsConnection C in Connections)
InSim.Send_MST_Message("/pitlane " + C.Username + "");
}
}
}
}
}

I don't know that framework, but it looks like you're sending everyone to pitlane whenever anyone hits node 56 - you find the right player but then loop through all the connections.

[HELP] Nickname in msg
(15 posts, started )
FGED GREDG RDFGDR GSFDG