Hello. I am trying to create a for each event ran on the server for all of the connected players in a session to be assigned an individual number in the PlayerInfo Structure. For example, Player 1 would be assigned 1, player 2 would be assigned 2, etc. Can someone please send me an example of this loop? Thank you.
Does something like this help you?
Player Array should be a list of connected clients, not sure what your Playerinfo Struct looks like but you should be able to use this loop to get the number of connected players through this.
So something like this? I don’t think it’s working. I’m trying to index each player by assigning them a value in order to make it easier in to call certain players.
Is this local multiplayer or online?
Online multiplayer through steam. If I can have an event run on server that indexs each player and adds it to their playerinfo struct, I can call from that struct (eg. spawn all players with indexes 1-4 somewhere and 5-8 somewhere else.)