DayZ Admin tools

Status
Not open for further replies.
I have been using a very quick and easy way to get a "basic/jr admin" and "super admin" version working. Super has everything unlocked, basic has just a few. (this is for the non-debug version).

Step#1 using a working version open "Activate.sqf" and add this to the end: (change the ####### to your jr admins ID's)
Code:
waituntil {!isnull (finddisplay 46)};
if ((getPlayerUID player) in ["########","########"]) then {
    sleep 30;
    player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute2.sqf","",5,false,true,"",""];
};

Step#2 Make a copy of your AdminToolsMain.sqf and Eexcute.sqf and call them AdminToolsMain2.sqf and Eexcute2.sqf

Step#3 Open AdminToolsMain2.sqf and change the admin ID's to match your jr admins again. Then scroll down to the "ToolsMenu =" section and remove any lines for the options you don't want them to have. Mine looks like:
Code:
ToolsMenu =
[
    ["",true],
        ["Heal Player(s)", [5],  "", -5, [["expression", format[EXECscript1,"healp.sqf"]]], "1", "1"],
        ["Look-N-Repair", [6],  "", -5, [["expression", format[EXECscript1,"looknrepair.sqf"]]], "1", "1"],
        ["Repair Buildings", [7],  "", -5, [["expression", format[EXECscript1,"fixbuildings.sqf"]]], "1", "1"],
        ["Spectate Player", [8],  "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"],
        ["Teleport To Me", [9], "", -5, [["expression", format[EXECscript1, "TPtoME.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
(you can change the numbers so they go 1-whatever. I didn't bother)

Step#4 Open Eexcute2.sqf and change the line to read
Code:
[] execVM "admintools\AdminToolsMain2.sqf";

Re-compile and upload and your main admins will still have all the options, while your jr admins will have whatever you want to give him. This is a very sloppy way of doing it, but it takes like 5 mins and works great.
 
I have been using a very quick and easy way to get a "basic/jr admin" and "super admin" version working. Super has everything unlocked, basic has just a few. (this is for the non-debug version).

Step#1 using a working version open "Activate.sqf" and add this to the end: (change the ####### to your jr admins ID's)
Code:
waituntil {!isnull (finddisplay 46)};
if ((getPlayerUID player) in ["########","########"]) then {
    sleep 30;
    player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute2.sqf","",5,false,true,"",""];
};

Step#2 Make a copy of your AdminToolsMain.sqf and Eexcute.sqf and call them AdminToolsMain2.sqf and Eexcute2.sqf

Step#3 Open AdminToolsMain2.sqf and change the admin ID's to match your jr admins again. Then scroll down to the "ToolsMenu =" section and remove any lines for the options you don't want them to have. Mine looks like:
Code:
ToolsMenu =
[
    ["",true],
        ["Heal Player(s)", [5],  "", -5, [["expression", format[EXECscript1,"healp.sqf"]]], "1", "1"],
        ["Look-N-Repair", [6],  "", -5, [["expression", format[EXECscript1,"looknrepair.sqf"]]], "1", "1"],
        ["Repair Buildings", [7],  "", -5, [["expression", format[EXECscript1,"fixbuildings.sqf"]]], "1", "1"],
        ["Spectate Player", [8],  "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"],
        ["Teleport To Me", [9], "", -5, [["expression", format[EXECscript1, "TPtoME.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
(you can change the numbers so they go 1-whatever. I didn't bother)

Step#4 Open Eexcute2.sqf and change the line to read
Code:
[] execVM "admintools\AdminToolsMain2.sqf";

Re-compile and upload and your main admins will still have all the options, while your jr admins will have whatever you want to give him. This is a very sloppy way of doing it, but it takes like 5 mins and works great.
i appreciate the effort you have put into this. but this is WAY over complicated the easest and fastet (code execution not time) is to do nested if statements in the file like this (the following code is meant solely as a example and is not meant to be used in the tools)
Code:
if ((getPlayerUID player) in ["########","########"]) then { //all admin id's
if ((getPlayerUID player) in ["########","########"]) then { //super admins
ToolsMenu =
[
    ["",true],
        ["Heal Player(s)", [5],  "", -5, [["expression", format[EXECscript1,"healp.sqf"]]], "1", "1"],
        ["Look-N-Repair", [6],  "", -5, [["expression", format[EXECscript1,"looknrepair.sqf"]]], "1", "1"],
        ["Repair Buildings", [7],  "", -5, [["expression", format[EXECscript1,"fixbuildings.sqf"]]], "1", "1"],
        ["Spectate Player", [8],  "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"],
        ["Teleport To Me", [9], "", -5, [["expression", format[EXECscript1, "TPtoME.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
if ((getPlayerUID player) in ["########","########"]) then { //admins
ToolsMenu =
[
    ["",true],
        ["Repair Buildings", [7],  "", -5, [["expression", format[EXECscript1,"fixbuildings.sqf"]]], "1", "1"],
        ["Spectate Player", [8],  "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"],
        ["Teleport To Me", [9], "", -5, [["expression", format[EXECscript1, "TPtoME.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
if ((getPlayerUID player) in ["########","########"]) then { //mods
ToolsMenu =
[
    ["",true],
        ["Spectate Player", [8],  "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
};
this is how i will be doing it when i relese the next update either later this week or the beginning of next week
 
setup a config file that holds 3 arrays, one for each admin group. Make the arrays global. (btw, is there any reason why all of your variables are global and not private ?)

then run a construct like

Code:
if(uid in BLUE_admins || uid in BLUE_superadmins || uid in BLUE_mods) then {
 
    Toolsmenu = [["",true]];
 
    if(uid in BLUE_superadmins) then {
 
        Toolsmenu set [count Toolsmenu, ["Heal Player(s)", [5], "", -5, [["expression", format[EXECscript1,"healp.sqf"]]], "1", "1"]];
 
        Toolsmenu set [count Toolsmenu, ["Look-N-Repair", [6], "", -5, [["expression", format[EXECscript1,"looknrepair.sqf"]]], "1", "1"]];
    };
 
    if !(uid in BLUE_mods ) then {
 
        Toolsmenu set [count Toolsmenu, ["Repair Buildings", [7], "", -5, [["expression", format[EXECscript1,"fixbuildings.sqf"]]], "1", "1"]];
 
        Toolsmenu set [count Toolsmenu, ["Spectate Player", [8], "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"]];
 
        Toolsmenu set [count Toolsmenu, ["Teleport To Me", [9], "", -5, [["expression", format[EXECscript1, "TPtoME.sqf"]]], "1", "1"]];
 
    };
 
    if(uid in BLUE_mods) then {
 
        Toolsmenu set [count Toolsmenu,  ["Spectate Player", [8], "", -5, [["expression", format[EXECscript1,"spectate.sqf"]]], "1", "1"]];
    };
    Toolsmenu set [count Toolsmenu,["", [-1], "", -5, [["expression", ""]], "1", "0"]];
    Toolsmenu set [count Toolsmenu,["Next page", [12], "#USER:ToolsMenu2", -5, [["expression", ""]], "1", "1"]];
    Toolsmenu set [count Toolsmenu,["Exit", [13], "", -3, [["expression", ""]], "1", "1"]];
};
 
I have been getting reports of vehicles not updating to the db after restarts. These are not vehicles spawned with the admin tools these are vehicles naturally spawned into the game. They keep moving back to lets say location A after moving to location B. My gamers have several bases and when they log out for a restart there heli, cars, trucks are moved to starting location.

I am not saying this update is responsible. I made the changes to my files, but could any of the changes for the vehicles spawn mess with or cause this type of problem. I recently tried to remove that bit of code from the admin tools and I am not sure If I was successful. I installed the updates as provided instructions said for Chernarus with debug.

I reversed changes in: dayz_server.pbo\compile\server_updateObject.sqf, and dayz_server.pbo\system\server_cleanup. I also //commented out the necessary line in AdminToolsMain.sqf to remove the option from the admins menu. Am I missing anything else to remove the vehicle spawn portion of the update?

I plan on adding the vehicle portion back into these wonderful tools once all the bells and whistles are figured out! I am not to worried because I have backups of my backups backup :)
Just wondering
 
Hi all,

Kindly need some help, appreciate for any advice. Try to get this tools on to my server, but i cant seen to locate activate.sqf or admintool.sqf file to add in my ID. I hosting with dayz.st.


locate this code in debug\playerstats.sqf(no debug version: Activate.sqf), and admintools\admintoolsmain.sqf
if ((getPlayerUID player) in ["#######","#######"]) then {
change ###### to your admins player id's
 
I have been getting reports of vehicles not updating to the db after restarts. These are not vehicles spawned with the admin tools these are vehicles naturally spawned into the game. They keep moving back to lets say location A after moving to location B. My gamers have several bases and when they log out for a restart there heli, cars, trucks are moved to starting location.

I am not saying this update is responsible. I made the changes to my files, but could any of the changes for the vehicles spawn mess with or cause this type of problem. I recently tried to remove that bit of code from the admin tools and I am not sure If I was successful. I installed the updates as provided instructions said for Chernarus with debug.

I reversed changes in: dayz_server.pbo\compile\server_updateObject.sqf, and dayz_server.pbo\system\server_cleanup. I also //commented out the necessary line in AdminToolsMain.sqf to remove the option from the admins menu. Am I missing anything else to remove the vehicle spawn portion of the update?

I plan on adding the vehicle portion back into these wonderful tools once all the bells and whistles are figured out! I am not to worried because I have backups of my backups backup :)
Just wondering

Check if those were towed / lifted/ teleported. Vehicles only get saved to the db when a player gets in / out.
 
Check if those were towed / lifted/ teleported. Vehicles only get saved to the db when a player gets in / out.

I will remind them to get in and out of towed vehicles. The heli's and suv's were driven/flown from A to B.

Items are taken from a tent and placed in a heli at camp A. He then flies to camp B and stows the gear into the tents there. The server restarts and bam! everything is back at camp A in the tents
 
new update is available on the github
changlog
-added Staff level menus (mod, admin...ext)
-removed the need to comment out portions of code in server files
-tweaked vehicle spawning (thanks Sarge)
-added Menu customization tutorial

to update overwrite existing admintools and debug folder
follow instructions in readme(may be updated soon for better clarity)
if you made changes to server_objectUpdate.sqf in the dayz_server.pbo
revert the changes back to default
Code:
if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0") then {
        _object_position = getPosATL _object;
        diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]", typeOf _object, _object_position select 0, _object_position select 1, _object_position select 2];
        _isNotOk = true;
    };
};
 
  • Like
Reactions: Fox
I having an issue trying to editing my spawn vehicle list. I've changed my 1st and 2nd page, and after some testing my 1st page works fine. My 2nd page causes a script restriction #254 kick when an admin click to enter the tools menu. Here is my 2nd page:
Code:
VehicleMenu2 =
[
["",true],
        ["Police Car", [2],  "", -5, [["expression", format[EXECscript5,"police.sqf"]]], "1", "1"],
        ["Moto", [3],  "", -5, [["expression", format[EXECscript5,"Moto.sqf"]]], "1", "1"],
        ["Bike", [4],  "", -5, [["expression", format[EXECscript5,"Bike.sqf"]]], "1", "1"],
        ["ATV", [5],  "", -5, [["expression", format[EXECscript5,"ATV.sqf"]]], "1", "1"],
        ["T90", [6],  "", -5, [["expression", format[EXECscript5,"tank.sqf"]]], "1", "1"],
        ["M1A1", [7],  "", -5, [["expression", format[EXECscript5,"tank2.sqf"]]], "1", "1"],
        ["Bradely", [8],  "", -5, [["expression", format[EXECscript5,"brad.sqf"]]], "1", "1"],
        ["M1128 APC", [9],  "", -5, [["expression", format[EXECscript5,"apc.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:VehicleMenu3", -5, [["expression", ""]], "1", "1"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

I've gone into my scripts.txt and changed line 257 to 1, and after that didn't work went back and changed 250-260 to 1 with no luck. Any suggestions would be greatly appreciated (ohh I've ofcourse added my own .sqf's to the vehicles folder for the new ones, and added the correct working database ID/names).
 
I having an issue trying to editing my spawn vehicle list. I've changed my 1st and 2nd page, and after some testing my 1st page works fine. My 2nd page causes a script restriction #254 kick when an admin click to enter the tools menu. Here is my 2nd page:
Code:
VehicleMenu2 =
[
["",true],
        ["Police Car", [2],  "", -5, [["expression", format[EXECscript5,"police.sqf"]]], "1", "1"],
        ["Moto", [3],  "", -5, [["expression", format[EXECscript5,"Moto.sqf"]]], "1", "1"],
        ["Bike", [4],  "", -5, [["expression", format[EXECscript5,"Bike.sqf"]]], "1", "1"],
        ["ATV", [5],  "", -5, [["expression", format[EXECscript5,"ATV.sqf"]]], "1", "1"],
        ["T90", [6],  "", -5, [["expression", format[EXECscript5,"tank.sqf"]]], "1", "1"],
        ["M1A1", [7],  "", -5, [["expression", format[EXECscript5,"tank2.sqf"]]], "1", "1"],
        ["Bradely", [8],  "", -5, [["expression", format[EXECscript5,"brad.sqf"]]], "1", "1"],
        ["M1128 APC", [9],  "", -5, [["expression", format[EXECscript5,"apc.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:VehicleMenu3", -5, [["expression", ""]], "1", "1"],
                ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

I've gone into my scripts.txt and changed line 257 to 1, and after that didn't work went back and changed 250-260 to 1 with no luck. Any suggestions would be greatly appreciated (ohh I've ofcourse added my own .sqf's to the vehicles folder for the new ones, and added the correct working database ID/names).
that's because of the Tanks and other armored vehicles
 
that's because of the Tanks and other armored vehicles
Thanks for the fast response. Though you have the t90 spawning fine, and I've used all the other ones on my server just not through your tool. What work around did you use for the t90 I'll do the same for the others.
 
Thanks for the fast response. Though you have the t90 spawning fine, and I've used all the other ones on my server just not through your tool. What work around did you use for the t90 I'll do the same for the others.
i just changed the class names till it worked, having said that some of the vehicles just wont spawn in no matter what you do i do not know why yet but i am working on it
 
Testing the new version (non debug) as a super admin Im getting the tools menu, but selecting it does nothing. I've reinstalled a few times and once trying a fresh install. Looking at the AdminToolsMain.sqf I noticed there was still a ref to debug monitor in their. However after removing that I still had the same issue. Anyone else having the same issue with the new non debug version.
 
Testing the new version (non debug) as a super admin Im getting the tools menu, but selecting it does nothing. I've reinstalled a few times and once trying a fresh install. Looking at the AdminToolsMain.sqf I noticed there was still a ref to debug monitor in their. However after removing that I still had the same issue. Anyone else having the same issue with the new non debug version.
I get the same, Tools Menu shows up but clicking it does nothing. I'm using the debug version though.
 
Testing the new version (non debug) as a super admin Im getting the tools menu, but selecting it does nothing. I've reinstalled a few times and once trying a fresh install. Looking at the AdminToolsMain.sqf I noticed there was still a ref to debug monitor in their. However after removing that I still had the same issue. Anyone else having the same issue with the new non debug version.
I get the same, Tools Menu shows up but clicking it does nothing. I'm using the debug version though.
i think i know whats causing it i will fix it in the morning
 
Status
Not open for further replies.
Back
Top