The online racing simulator
#1 - ndiw
(insim) how to get player name list? (single user)
Hi, i'm trying to build an application using C++ builder,
how to get user list in single player mode (AI names including me) in the before or when the race / practice begin?
according to insim.txt the username / nickname only appears in some events, which are only appeared in multiplayer mode like NCN CNL NPL PLL CPR or when the player gain the first laptime.

in X11 Insim application made by DaCe it able to display username / nickname I'm not sure if he get the names from the memory or via insim, because the application using .dll

Thanks.
You would need to keep an updated table in your program with the Usernames/Player names, associated with the ID of the player, so you can do a lookup when an interesting packet references this ID. This would be done by adding to the list when you receive a new non-existing NPL packet, and removing from the list when receiving a PLL packet.

If you want to refresh the table at some point (like when you start your program), send a STA packet to get the number of players, and then ask for new NPL packets.

TRACKING PACKET REQUESTS
------------------------
- send to LFS to request player / connection / result packets
- these requests work even if race tracking is not switched on

To request a IS_RES, send a InSimPack with Id = "RES" and value = result number (0,1,2...)
To request a IS_NPL, send a InSimPack with Id = "NPL" and value = player number (0,1,2...)
To request a IS_NCN, send a InSimPack with Id = "NCN" and value = conn number (0,1,2...)
To request a IS_NLP, send a InSimPack with Id = "NLP" and value = 0
To request a IS_MCI, send a InSimPack with Id = "MCI" and value = 0

I didn't even know about this before I read the post above. I had the same problem
I wrote a BCB VCL code to manage all users in a TreeListView (View Style=VSReport) including "kick,ban,.... etc". It works on demo and full hosts!
I used the Insim "player specific" packets like the example shown above. It´s possible to get user via Insim. I remember a guy who told me that a file exist which stores all user data but i don´t know exactly. I imagined that this method is too dirty.

ICQ: 153443594


Edit: Oh no, please forget that dll, i think its for other purposes
#5 - ndiw
aha it works..

first when the program connected to LFS I send a STT *to findout how many players are

insim replies with STA,

if NumPlayers > 0 send NPL value 0 to NumPlayers-1

and I got all of the players info!

thanks Silkswift.

*edit: not STA
Edit: Ok, i see what you mean
Quote from ndiw :thanks Silkswift.

Anytime. Glad to hear you got it to work.

FGED GREDG RDFGDR GSFDG