The online racing simulator
Detecting closest players in InSim.NET
Hello to all, i started my cruise insim in C# with InSim.NET and, how i can detect players next me?

I seeyed in this post but, i need to use like a cop system (for cruise), case someone can help me, thanks u Big grin
Looks pretty well explained in the thread you linked here. What's the problem?
Hey, what you are looking for is the MCI.Info packet... You might just wanna do a loop for the packets that determines the distance.. You can use the coordinates of the vehicle to do that. Then just take a look at the player id... Insim.txt can help you...
Im sorry but you can give to me code?
Quote from Getaway Driver2121 :Im sorry but you can give to me code?

I am very sorry, but I am not familiar with .NET insim stuff... With python it would be something like
for cars in MCI.Info...
store your coordinates
For coordinate in coordinates
Calculate distance to you

Closest car = min(distance)

If this makes sense
Quote from Rob2003 :I am very sorry, but I am not familiar with .NET insim stuff... With python it would be something like
for cars in MCI.Info...
store your coordinates
For coordinate in coordinates
Calculate distance to you

Closest car = min(distance)

If this makes sense

Thanks, im try!

FGED GREDG RDFGDR GSFDG