The online racing simulator
#1 - lunis
Cruise money.
Hi, I want to know where is the code in what is money increasing speed. In my server i can get money really fast and other players too. So how can i repair it. If can please write to my skype - robis2000
Sorry i dont have skype installed but its in the payuser elapsed

below is the current code in your insim.

private void PayUser_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsPlayer Ply in Players)
{
if (Ply.Payout > 4)
{
Connections[GetConnIdx(Ply.UniqueID)].Cash += 2;
Ply.Payout = 0;
}
}
}

so you can change it too this if you want it to go slower,

private void PayUser_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsPlayer Ply in Players)
{
if (Ply.Payout > 4)
{
Connections[GetConnIdx(Ply.UniqueID)].Cash += 1;
Ply.Payout = 0;
}
}
}

or if you want it even slower,

private void PayUser_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsPlayer Ply in Players)
{
if (Ply.Payout > 6)
{
Connections[GetConnIdx(Ply.UniqueID)].Cash += 1;
Ply.Payout = 0;
}
}
}

#3 - lunis
Thank you
No problem
#5 - Kunal
Hello, people!

Here's my code, made as described above, but does not work! As there were 2 charges, and left!

What's wrong? File "Form1" ?



// Money payout
private void PayUser_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
try
{
foreach (clsPlayer Ply in Players)
{
if (Ply.Payout > 6)
{
Connections[GetConnIdx(Ply.UniqueID)].Cash += 1;
Ply.Payout = 0;
}
}
}
catch { }
}

All thanks, decided himself!
why do you have a try and a catch in it?

FGED GREDG RDFGDR GSFDG