Jump to content
Sign in to follow this  
XxCRSxX

EMS WhiteList

Recommended Posts

Hi, I have been trying to create a script that will allow only players with the UID'S I have selected to access the EMS slot.

the EMS are independent and this is on altis life.

Thanks,

CRS

Share this post


Link to post
Share on other sites
if (!isServer && isMultiplayer) then {
 _whiteList = ["12356","654321"]; // enter ID's here
 waitUntil {!isNull player};
 if (side player == independent) then {
   waitUntil {(getPlayerUID player) != ""};
   _id = getPlayerUID player;
   if (!(_id in _whiteList)) then {
     sleep 1;
     endMission "LOSER";
   }; 
 };
};

Share this post


Link to post
Share on other sites

If I wanted to move the ems over to civ what would I have to change? Because I don't want every single civ slot white listed just the ems ones.

Thanks for the help!

CRS

Share this post


Link to post
Share on other sites

You could name the "ems" units in the editor and put them in an array

_ems = ["ems01", "ems02"];

Not sure if strings are still required if some unit have not been initalised, might've been patched.

Then remove the side player check and replace it with

if ((str player) in _ems) then {

Share this post


Link to post
Share on other sites

Thanks mate it worked, I will test it on the proper server tonight but it seemed to work fine running it through TADST. :)

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
Sign in to follow this  

×