Player ID

From Soldat Community Wiki
Jump to: navigation, search

Player IDs are unsigned integers used by the server and admins as an easy way to identify players and bots. IDs assignment , which is done by the server, starts at 1 (one), and each player that joins gets his own unique ID, the lowest possible. This means that the ID don't necessarily reflect the join order of players.

John joins the game - ID 1
Billy joins the game - ID 2
Sniper joins the game - ID 3
Billy leaves the game - ID 2 free for use
John joins the game - ID 2

To view player IDs while in-game, you have to press the "/" key and then F1. You will see the ID in the players board, to the left of the player's nickname. To get a player's ID when connected as admin, you'll need to parse the refresh packet. When using scripting this is much easier, you use NameToID.

When it comes to scripting, Player IDs are most commonly found as an unsigned char, which in pascal is byte (ranging from 0 to 255).

Admin programs that run commands on a server will count as ID being 255.