Jump to content
Michael Marsh

Add all player UIDs to array

Recommended Posts

Hi,

 

I'm working on a multiplayer mission, where things like score, cash  etc are saved to a clients profile space. This works very well, but I would like to have all the data saved on the server profile space instead.

 

But I am having a problem getting all player UIDs into a new array.  {getPlayerUID _x} foreach allplayers, just gives me the last result and not an array of UIDs. 

 

 

 

 

 

Share this post


Link to post
Share on other sites

You want to use 'apply' instead of 'foreach'. And you then need to switch the order.

Share this post


Link to post
Share on other sites

At what time? allPlayers is just an array of the in-game players, not those who disconnected before the command.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×