Jump to content
Midnighters

Selecting player object from server

Recommended Posts

Hello, 

I was wondering if it is possible to select the player object that is associated with a player's UID.

What I am trying to achieve is a player save on the server profile.

Share this post


Link to post
Share on other sites

Something like this maybe

private _players = [];
{if (getPlayerUID _x in MY_UID_LIST) then {_players pushBack _x}} forEach allPlayers;

 

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, Nikander said:

Something like this maybe


private _players = [];
{if (getPlayerUID _x in MY_UID_LIST) then {_players pushBack _x}} forEach allPlayers;

 

Aye, I'll take a look at trying to use this method. Thanks for the feedback. 

Share this post


Link to post
Share on other sites

Another way to skin the cat:

EDIT: Sorry if the format is bad, my phone is being an ass atm...

private _players = allPlayers select {

getPlayerUID _x in MY_UID_LIST};
  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, jshock said:

Another way to skin the cat:

EDIT: Sorry if the format is bad, my phone is being an ass atm...


private _players = allPlayers select {

getPlayerUID _x in MY_UID_LIST};

Yep, I modified the code above to do exactly what you did here. Thanks for both of your help. 

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

×