Jump to content
  • 0

Action Menu for Specific Players


MoosePP

Question

***ALL CREDITS FOR BASE SCRIPT GO TO***

NoxSicarius

 

Okay, so, I modified Nox's Action Menu to be for just admin boxes and the scroll option to be "Admin Boxes."

 

activate.sqf:

private["_veh", "_idx"];
Sleep 15; 
_idx = -1;
 
while {alive player} do {
if(_idx == -1) then {
_idx = (vehicle player) addaction [("<t color=""#FF0000"">" + ("Admin Boxes") + "</t>"),"custom\admin_crates\menu.sqf","",6,false,true,"",""];
_veh = vehicle player;
};
if (_veh != vehicle player) then
{
_veh removeAction _idx;
_idx = -1;      
};
Sleep 2;
};
 
menu.sqf:
_pathtoscripts = "custom\admin_crates\";
_EXECscript1 = 'player execVM "'+_pathtoscripts+'%1"';
 
ActionMenu =
[
["",true],
["Cinder Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"cinder.sqf"]]], "1", "1"],
["Wood Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"wood.sqf"]]], "1", "1"],
["AK Crate", [], "", -5, [["expression", format[_EXECscript1,"ak.sqf"]]], "1", "1"],
["", [], "", -5, [["expression", ""]], "1", "0"],
["Exit", [20], -5, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:ActionMenu";

 
What I need, is to be able to tie activate.sqf to a list of PlayerUID's (the admins).
 
I tried to put a PlayerUID check line at the top of the activate.sqf and it didn't work. It was one from out loadout script with our player id's:
if ((getPlayerUID player) in ["76561198042454417","76561198018610724","76561198036952663"]) then {
 
Any help would be appreciated.
-Moose, Spencer
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

If you followed the install step 7.

Open actions\Actions_Menu.sqf and replace "111111111" near the top of the file with your player UID.

 

if(isNil "AdminList") then {
/*
    If you use Nox's Epoch Admin Tools disregard AdminList/ModList code.
    If you do not use that admin tool then replace 111111111 with
    your UID if you want to use.
*/
    AdminList = [
    "111111111",
    "999999999",
    "999999999"
    ];
    ModList = [
    "999999999",
    "999999999"
    ];
};

if((getPlayerUID player) in AdminList ||(getPlayerUID player) in ModList) then {

 

SO try This in your menu.sqf:

 

 

_pathtoscripts = "custom\admin_crates\";
_EXECscript1 = 'player execVM "'+_pathtoscripts+'
%1"';

 

 if(isNil "AdminList") then {
/*
    If you use Nox's Epoch Admin Tools disregard AdminList/ModList code.
    If you do not use that admin tool then replace 111111111 with
    your UID if you want to use.
*/
    AdminList = [
    "111111111",
    "999999999",
    "999999999"
    ];
    ModList = [
    "999999999",
    "999999999"
    ];
};

if((getPlayerUID player) in AdminList ||(getPlayerUID player) in ModList) then {

 

ActionMenu =
[
["",true],
["
Cinder Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"cinder.sqf"]]], "1", "1"],
["
Wood Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"wood.sqf"]]], "1", "1"],
["
AK Crate", [], "", -5, [["expression", format[_EXECscript1,"ak.sqf"]]], "1", "1"],
["", [], "", -5, [["
expression", ""]], "1", "0"],
["
Exit", [20], -5, [["expression", ""]], "1", "1"]
];
showCommandingMenu "
#USER:ActionMenu";

Link to comment
Share on other sites

  • 0

If you followed the install step 7.

Open actions\Actions_Menu.sqf and replace "111111111" near the top of the file with your player UID.

 

if(isNil "AdminList") then {

/*

    If you use Nox's Epoch Admin Tools disregard AdminList/ModList code.

    If you do not use that admin tool then replace 111111111 with

    your UID if you want to use.

*/

    AdminList = [

    "111111111",

    "999999999",

    "999999999"

    ];

    ModList = [

    "999999999",

    "999999999"

    ];

};

if((getPlayerUID player) in AdminList ||(getPlayerUID player) in ModList) then {

 

SO try This in your menu.sqf:

 

 

_pathtoscripts = "custom\admin_crates\";

_EXECscript1 = 'player execVM "'+_pathtoscripts+'%1"';

 

 if(isNil "AdminList") then {

/*

    If you use Nox's Epoch Admin Tools disregard AdminList/ModList code.

    If you do not use that admin tool then replace 111111111 with

    your UID if you want to use.

*/

    AdminList = [

    "111111111",

    "999999999",

    "999999999"

    ];

    ModList = [

    "999999999",

    "999999999"

    ];

};

if((getPlayerUID player) in AdminList ||(getPlayerUID player) in ModList) then {

 

ActionMenu =

[

["",true],

["Cinder Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"cinder.sqf"]]], "1", "1"],

["Wood Donation Crate", [], "", -5, [["expression", format[_EXECscript1,"wood.sqf"]]], "1", "1"],

["AK Crate", [], "", -5, [["expression", format[_EXECscript1,"ak.sqf"]]], "1", "1"],

["", [], "", -5, [["expression", ""]], "1", "0"],

["Exit", [20], -5, [["expression", ""]], "1", "1"]

];

showCommandingMenu "#USER:ActionMenu";

Yeah, I know about that. The thing is, then, the option shows for everyone. I want to be able to tie the activate to a PlayerUID. So only admins see the scroll option.

Link to comment
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
  • Advertisement
  • Discord

×
×
  • Create New...