The online racing simulator
#1 - roofL
[NEED HELP] Cruise insim auto-messages
Hello everyone!

I have a problem with a cruise insim. I using an open source insim and I see the "auto-messages" are added. I studied programming, but I don't understand why the auto messages are not working.

#region ' Auto Message '
if (Connections.Count > 1)
{
switch (Message)
{
case 0:
MsgAll("^2>^7 Drive on the Right side of the Road!");
break;

case 1:
MsgAll("^2>^7 Swearing, Ramming, Insults and Disrespecting");
MsgAll("^2>^7 May Result to ban.");
break;


case 2:
MsgAll("^2>^7 Visit our forum at:");
MsgAll("^2>^3 " + Website);
break;

case 3:
MsgAll("^2>^7 Have a problem? Found a bug?");
MsgAll("^2>^7 Feel free to tell it to our admins!");
break;

case 4:

MsgAll("^2>^7 Keep the our server clean from swearing!");

break;

case 5:

MsgAll("^2>^7 The courrent version of insim ^6v" + InSimVer);
Message = 0;
break;
}
Message += 1;
}
#endregion

Please someone help me to slove this problem and make this feature to working!
Thanks in advance.
Have you tried making a timer? Like, every minute executes that lines of code?
#3 - roofL
Hmmm.. I tried but something wrong and I don't know what lol
VS shows me 12 different error... lol
what's wrong?
maybe you did it wrong
try this:
in the form load, add these lines:

#region ' Auto-Messages '

System.Timers.Timer MessagesTimer = new System.Timers.Timer(60000);
MessagesTimer.Elapsed += new System.Timers.ElapsedEventHandler(MessagesTimer_Elapsed);
MessagesTimer.Enabled = true;

#endregion

then create a new event in your code:

private void MessagesTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
#region ' Auto Message '
if (Connections.Count > 1)
{
switch (Message)
{
case 0:
MsgAll("^2>^7 Drive on the Right side of the Road!");
break;

case 1:
MsgAll("^2>^7 Swearing, Ramming, Insults and Disrespecting");
MsgAll("^2>^7 May Result to ban.");
break;


case 2:
MsgAll("^2>^7 Visit our forum at:");
MsgAll("^2>^3 " + Website);
break;

case 3:
MsgAll("^2>^7 Have a problem? Found a bug?");
MsgAll("^2>^7 Feel free to tell it to our admins!");
break;

case 4:

MsgAll("^2>^7 Keep the our server clean from swearing!");

break;

case 5:

MsgAll("^2>^7 The courrent version of insim ^6v" + InSimVer);
Message = 0;
break;
}
Message += 1;
}
#endregion
}

#5 - roofL
Zazcoisa, maybe I did something wrong but now the VS shows me 23 different errors. LOL
Any idea? xD
well, maybe the other codes in your project has some errors
or some objects are not defined
i will tell you go to From1.cs and globalbluffer and remove that /* from automessege
Hi you need to define that case otherwise you cant call it

FGED GREDG RDFGDR GSFDG