And btw: That if-statement is bulls***
Somehow you are missing the complete idea behind if statements and you are missing a lot of logical thinking.
If x equals 123 AND x equals 145. What value is x? It can only be one of them.
So either you want X to be 123 or 145 or you want x to be between 123 and 145... I don't know... perhaps you even want something completely different.
Dou you want the position to be inside of a rectangle/line defined by the two points 123/145 and 123/167?
-> if ((Y >= 123) && (Y >= 145) && (Y <= 123) && (y <= 167))
It's not really "the middle". If you look at this thread: http://www.lfsforum.net/showthread.php?t=37411 you see that scawen wrote "The LFS coordinate origin (x=0, y=0) is in the centre of the map.". Which means the origin is mostly in the center of the whole track areal.
Well imo the easiest way to deal with disconnects(your example) is to save the data on the client side until a restart occured... Probably depends on how you notice disconnects in your program and doesn't work with data while the client is not connected :/
Aut afaik there are no possibilities to know what happened while your client was disconnected, and I don't think there are any workarounds :/
a) Wrong thread. This one is about some pictures; not about the new relay flash
b) Probably because your server admin didn't add them to the relay on lfsworld.
Speed is possible, as it's in the MCI packet. But fuel/gear/rpm not as it's only available in the gauge packet. And pitting is availble through insim (IS_PIT).