Jump to content
Sign in to follow this  
Norbak

Using GetPlayerUID with player list

Recommended Posts

Starting from:

_puid = getPlayerUID _x;

hint format ["Player Name: %1\nPUID: %2", name _x, _puid];

Making a menu with a list of every player in the server, choosing one of them and using later GetPlayerUID command on him.

Is is possible?

Share this post


Link to post
Share on other sites

Using Viba's Script ... but Something is wrong when it changes...:

if (isServer) then {

"relayPosMsg" addpublicvariableeventhandler {

_arr = _this select 1;

_source = _arr select 0;

_destination = _arr select 1;

receivePosMsg = _source;

(owner _destination) publicvariableclient "receivePosMsg";

};

};

sendMessage = {

relayPosMsg = [player, (_this select 1)];

publicvariableserver "relayPosMsg";

{player removeaction _x;} forEach actions;

[] spawn addLocAction;

compilePlayerList = {

actions = [];

player removeAction action1;

_action = player addAction ["Cancel", "actionHandler.sqf", "{player removeaction _x;} forEach actions; [] spawn addLocAction;",999,false,true,"","alive player"];

actions = actions + [_action];

{

_text = format ["Get Player UID %1",name _x];

_args = format ['[%1] spawn sendMessage;',_x];

_action = player addaction [_text, "actionHandler.sqf", _args,999,false,true,"","alive player"];

actions = actions + [_action];

} forEach playableUnits;

};

"receivePosMsg" addpublicvariableeventhandler {

_puid = getPlayerUID _x;

hint format ["Player Name: %1\nPUID: %2", name _x, _puid];

};

addLocAction = {

action1 = player addAction ["Get Player UID...", "actionHandler.sqf", "[] spawn compilePlayerList;",999,false,true,"","alive player"];

};

[] spawn addLocAction;

};

and

//This in actionHandler.sqf in the mission folder:

Call compile format ["%1", _this select 3];

Edited by kyopower

Share this post


Link to post
Share on other sites
Making a menu with a list of every player in the server, choosing one of them and using later GetPlayerUID command on him.

Is is possible?

Yes. You need to create dialog with listbox and add to it player names and UIDs as hidden field.

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  

×