Player Id rule

I could see that server, client 1, client 2 etc… would all have Player IDs that were greater by 1 then the previous, so if a server had player id 375, client 1 would had 376, client 2 would had 377 etc…

My question is, is that the rule? Will each next client get player id that is an increment of the previous one?
I ask this because I would like to use that in order to set different properties when a new client logs in.

Why do you need the PlayerID for this? You can use “PostLogin” to get the PlayerController of the joined player. With the PlayerController you can get the Pawn, or the PlayerState. And with the PlayerState you could get the ID if needed.

Suppose I have 3 players. Each one gets some items when it logs in. I want the first player to get the first set of items I’ve prepared and the second one to get the second set of items etc. I thought I could check player id after login, in order to see if the player is first, second or third client that logged in.

Hello MarsaPalas!

Did you find a solution?

Sorry, it seemed like i missed your comment.

No you can’t really use the ID for this. They are random. Although they are incrementing by 1. But they could be 3005,3006 and 3007 or so.

Since you want to give a predefined set of items, you can, for example, create an array for each set of items. So for example arrays. Then you have an Int Variable on the ServerSide that is 1 by default. When a player connects, you get the PostLogin Event, make a “Switch on Int” with the Int Variable and make 3 cases, 1 to 3 for each array. Then at the end, you increment the Int, so that the next Player gets the second array.

There are other things you could do, but thats the basic logic i would apply.