Jump to content
Sign in to follow this  
JaFuzz

Get player UID

Recommended Posts

I would like to restrict two units on the SRU fallujah server to certain people

I know that you can lock a unit to read a player UID and if it dont match it kicks them.

Could anyone shed some light on this? Have done a search can see any help regarding this.

Thanks

Share this post


Link to post
Share on other sites

Not tested, but this might work.

// nul=[this,['123123','123123','123123']] execVM "allowedIDS.sqf";

_unit = _this select 0;
_ids = _this select 1;

while { !((getPlayerUID _unit) in _ids) } do {
 if ((local _unit) && (isPlayer _unit)) then {
   endMission "KILLED";
 };
};

I wouldn't use the actual #kick command, as that has some security problems.

Share this post


Link to post
Share on other sites

// nul=[this,['123123','123123','123123']] execVM "allowedIDS.sqf";

_unit = _this select 0;
_ids = _this select 1;

while { !((getPlayerUID _unit) in _ids) } do {
 if ((local _unit) && (isPlayer _unit)) then {
   endMission "KILLED";
 };
};

Thank you. I take it i have to add this to the player init line ?

execVM "allowedIDS.sqf";

Share this post


Link to post
Share on other sites

The init you need is the comment at the top:

nul=[this,['123123','123123','123123']] execVM "allowedIDS.sqf";

Just replace this:

'123123','123123','123123'

With a list of playerids allowed to use the unit. Adding some sort of notification would be a good idea too I guess.

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  

×