MC.Quit 1 Posted February 27, 2018 Hello i'm pretty new to scripting and i want to make a mission with a one admin slot. So I want the Admin slot to have a "addAction" that show the admin all the players in the session. An when he selects 1 player that player gets some "AddAction" commands that allow him to do stuff. As a new guy to all this scripting stuff i do not know how to make it happen. PLEASE PLEASE PLEASE help me. :) thanks have a good day (: i though about some thing like that... down here would be the idea --------- on the admin slot would be an "addAction" with the action (Give Power) when the "Give Power" action is pressed the players list would be shown and the player that the admin selects gets some power example : ---------- Give Power -------------- Player list <-- would be in green text Shawn Jhon Alex Dan ---------- if Dan is selected then a hint/titletext would appear and say "Dan has been giving admin power" and then Dan has some addactions that i would make. Share this post Link to post Share on other sites
HazJ 1289 Posted February 27, 2018 I think you are diving in way too deep. I recommend you Google and learn the basics to start with. Another way would be to use getPlayerUID command with an array of UIDs. adminsArr = [ "12345", "54321" ]; player addAction ["Show online admins", { private _onlineAdmins = []; { if (!isNull _x && getPlayerUID _x in adminsArr) then { _onlineAdmins pushBack (name _x); }; } forEach playableUnits; hintSilent format ["Online admins: %1", _onlineAdmins]; }]; Could probably ditch the forEach with simple method using nested adminsArr which contains UID + name then use joinString/splitString perhaps. player addAction ["God Mode", {if (isDamageAllowed (_this select 0)) then {(_this select 0) allowDamage false;} else {(_this select 0) allowDamage true;};}, nil, 0, false, false, "", "(getPlayerUID _this in adminsArr"]; Not tested. Share this post Link to post Share on other sites
MC.Quit 1 Posted February 28, 2018 23 hours ago, HazJ said: I think you are diving in way too deep. I recommend you Google and learn the basics to start with. Another way would be to use getPlayerUID command with an array of UIDs. adminsArr = [ "12345", "54321" ]; player addAction ["Show online admins", { private _onlineAdmins = []; { if (!isNull _x && getPlayerUID _x in adminsArr) then { _onlineAdmins pushBack (name _x); }; } forEach playableUnits; hintSilent format ["Online admins: %1", _onlineAdmins]; }]; Could probably ditch the forEach with simple method using nested adminsArr which contains UID + name then use joinString/splitString perhaps. player addAction ["God Mode", {if (isDamageAllowed (_this select 0)) then {(_this select 0) allowDamage false;} else {(_this select 0) allowDamage true;};}, nil, 0, false, false, "", "(getPlayerUID _this in adminsArr"]; Not tested. Awesome! works perfect! thanks Share this post Link to post Share on other sites