Get UID from for each allPlayers;

2 posts in this topic

_aa = [];
	_uid = getPlayerUID _x;
	_aa pushback _uid;
} forEach allPlayers;

hint format["%1",_aa];
// Should be an array of all the players UIDs

You would use a "forEach" loop for this. Whatever is in between the braces, will run for each object inside the array. _x being the current object it is running. Pushback is taking the object in the current loop and appending it to the end of the _aa array. I'm currently not able to test this code, but it should work. Keep in mind, the "allPlayers" command will grab all human players including dead players and headless clients. 

Edited by WolfkillArcadia

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.