The online racing simulator
Add a offline player counter
Hi guys,

I need just a bit help whit my InSim app, ive startet coding a little race system whit online stats ect.
but now ive got a little problem i want to recall the userstarts ect and the offline time
i know how i can recall the stats but i dont know how to set a "offline"timer.


If it helps im using Lfs_External 1.1.10

Best and hopefully Regarts Marco1
#2 - KuHS
Hi, ill try to explain you. First, then player disconnects save his date and then player connects leave the save date, then player disconnects again save his date, so save players date then they're disconnecting. If you want you can save it with days, minutes, seconds, months, years... I think the days is good for time, choose your own:

int year = DateTime.Now.Year * 365;
int month = DateTime.Now.Month * 30;
int day = DateTime.Now.Day;
int Date = year + month + day;

Then just add saving stuff, and here you go you've got have your own timer! You can choose seconds but you will need to convert them into minutes, hours, days, months...
okay ive got it thx m8
Greez Heiko
You can just use ToString() and Parse() to read and write the date.

string save = DateTime.Now.ToString();

DateTime load = DateTime.Parse(save);

Or use the Ticks.

long save = DateTime.Now.Ticks;

DateTime load = new DateTime(save);


FGED GREDG RDFGDR GSFDG