Simple question about playerid ?
#1

When player connect player id is given to player for all time until his left game,
but when he left game what happen to that id ?

And when player reconnect after server restart is the same id given to him?
Reply
#2

Well, each player who joins gets an ID. If no one is on the server, the player gets ID 0. If another player joins, he gets the next ID, and so forth. (player1 = 0, player2 = 1, etc). If playerID 0 leaves, ID 0 would be open. So if a player joins, he gets the lowest ID possible. If the server restarts, it depends on who joins first and so forth. If a playerid 0 is alt-tabbed and decides to get back In-Game right after a restart, and two other players are already in, he would not get 0, unless playerid 0 left the game before he joined.

Do you understand this?

Sorry if this is not what you meant.
Reply
#3

No, ID's change on disconnect. On every connect, the player is assigned with a new ID.

Also no, the other player ID's do not change if one player disconnects. Simply, the next player to connect after the player disconnected, takes his place.
Reply
#4

Players get the lowest available ID.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)