Jump to content
fusion13

[Release] Arma 3 Admin Menu for training severs

Recommended Posts

A Couple quick Scripts for use in Training servers etc

What this consist of "God Mode" "All Vehicles" "All Weapons" "Teleport" "Heal Self" "Heal Others)"

Information

I made this "quickly" this is for server side execution only, this is a addAction menu meaning, once the UID is entered into it, once you join the server you will be able to scroll and see a Action called "Tools" this will then prompt a menu when clicked that is always activated when scrolled. NOTE WITH THE LOOP THE FIRST LIFE WILL HAVE TWO MENUS!! Also the newest update will have a extra folder called "fusionsmenu" in the main directory then we will go on to doing the "admin" folder to it!

Lets Get into it now

First script

inside of the fusionsmenu folder make a folder called "admin" inside admin make a file called

"activate.sqf"

inside of activate.sqf

if ((getPlayerUID player) in ["YOUR UID HERE USE COMMAS FOR DIFFERENT UIDS"]) then {
;
act = player addAction ["Tools",{execVM "fusionsmenu\admin\tools.sqf";}];

};

loop.sqf

while {true} do
{
 waitUntil {alive vehicle player};
[] execVM "fusionsmenu\admin\activate.sqf";


 waitUntil {!alive player};
};

NOW THE IMPORTANT PART INSIDE OF THE INIT.SQF MAKE A LINE WITH THE FOLLOWING CODE

execVM "fusionsmenu\admin\loop.sqf
execVM "fusionsmenu\admin\activate.sqf"

Now The Goodies

Now we will make a file named "tools.sqf" inside of the folder "admin", The tools.sqf now houses all of the weapons, vehicles, and tools!

tools.sqf

_pathtotools = "fusionsmenu\admin\tools\";
_pathtoweapon = "fusionsmenu\admin\weapons\";
_pathtovehicles = "fusionsmenu\admin\veh\";
_EXECscript1 = 'player execVM "'+_pathtotools+'%1"';
_EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"';
_EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"';


if ((getPlayerUID player) in ["UID HERE"]) then { //all admins
if ((getPlayerUID player) in ["AND HERE"]) then { //Admins Go Here aswell
	adminmenu =
	[
		["Fusions Menu",true],
			["Tools", [4], "#USER:ToolsMenu", -5, [["expression", ""]], "1", "1"],
			["Cars", [4], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
			["Weapons", [5], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
			["", [-1], "", -5, [["expression", ""]], "1", "0"],
		["Exit", [13], "", -3, [["expression", ""]], "1", "1"]		
	];};
} else {
adminmenu =
[
["",true],
	//["Toggle Debug", [2], "", -5, [["expression", format[_execdebug,"playerstats.sqf"]]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
ToolsMenu =
[
["Tools",true],
       ["Teleport", [2],  "", -5, [["expression", format[_EXECscript1,"teleport.sqf"]]], "1", "1"],		
       ["God Mode", [3],  "", -5, [["expression", format[_EXECscript1,"god.sqf"]]], "1", "1"],
	["Vehicle God Mode", [3],  "", -5, [["expression", format[_EXECscript1,"cargod.sqf"]]], "1", "1"],
	["Heal Self", [4],  "", -5, [["expression", format[_EXECscript1,"heal.sqf"]]], "1", "1"],
	["Heal Player(s)", [5],  "", -5, [["expression", format[_EXECscript1,"healp.sqf"]]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
		["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

WeaponMenu =
[
["Weapons",true],
//Add Weapons Here Gave some examples :D
	["MX", [2],  "", -5, [["expression", format[_EXECscript3,"mx.sqf"]]], "1", "1"],
	["MK 200", [3],  "", -5, [["expression", format[_EXECscript3,"mk200.sqf"]]], "1", "1"],
	["LRR", [4],  "", -5, [["expression", format[_EXECscript3,"lrr.sqf"]]], "1", "1"],
	["EBR", [5],  "", -5, [["expression", format[_EXECscript3,"ebr.sqf"]]], "1", "1"],
	["GM6", [6],  "", -5, [["expression", format[_EXECscript3,"gm6.sqf"]]], "1", "1"],
	["P07", [7],  "", -5, [["expression", format[_EXECscript3,"phgun.sqf"]]], "1", "1"],

		["Next page", [12], "#USER:WeaponMenu2", -5, [["expression", ""]], "1", "1"],
		["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WeaponMenu2 = 
[
["Weapons 2",true],
//Add Weapons Here Gave another page because it could get a little confusing :P
	["MX", [2],  "", -5, [["expression", format[_EXECscript3,"mx.sqf"]]], "1", "1"],
	["Exit", [13], "", -3, [["expression", ""]], "1", "1"]

];
VehicleMenu = 
[
["Vehicles",true],
	["ATV", [2],  "", -5, [["expression", format[_EXECscript5,"ATV.sqf"]]], "1", "1"],
	["Hunter Armed", [3],  "", -5, [["expression", format[_EXECscript5,"hunter.sqf"]]], "1", "1"],
	["Offroad Truck HMG .50", [4],  "", -5, [["expression", format[_EXECscript5,"offroad.sqf"]]], "1", "1"],
	["", [-1], "", -5, [["expression", ""]], "1", "0"],
		["Next page", [12], "#USER:VehicleMenu2", -5, [["expression", ""]], "1", "1"],
		["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
VehicleMenu2 = 
[
["Vehicles 2",true],
	["Example", [2],  "", -5, [["expression", format[_EXECscript5,"Example.sqf"]]], "1", "1"],
	["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

showCommandingMenu "#USER:adminmenu";

Place inside admin\tools

god.sqf

cutText ["Godmode activated.", "PLAIN"];
player removeAllEventHandlers "handleDamage";
player addEventHandler ["handleDamage", {false}];

teleport.sqf

cutText ["Click somewhere on the map to move there", "PLAIN"];
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';true;";

heal.sqf

hint format ["Healing..."];
sleep 2;
player setDamage 0;
hint format ["Done"];

Yes I know its a little weird that I have the hints but I wanted it to be cooler :P

healp.sqf

//Healing Others Script
_max = 10; snext = false; plist = []; pselect5 = "";
{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
{if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
smenu =
{
_pmenu = [["",true]];
for "_i" from (_this select 0) to (_this select 1) do
{_arr = [format['%1', plist select (_i)], [12],  "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
_pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
showCommandingMenu "#USER:_pmenu";
};
_j = 0; _max = 10; if (_max>9) then {_max = 10;};
while {pselect5 == ""} do
{
[_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
WaitUntil {pselect5 != "" or snext};	
snext = false;
};
if (pselect5 != "exit") then
{
_name = pselect5;
{
	if(name _x == _name) then
	{
		hint format ["Healing %1", _name];
		_x setDamage 0;
		sleep 0.25;
	};
} forEach entities "CAManBase";
};

Now make a folder inside of the folder called "admin" called "veh"

In this folder is where you will put all of your vehicle scripts.

two examples of a vehicle script

atv.sqf

_spawn = "B_G_Quadbike_01_F";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];

hunter.sqf

_spawn = "B_MRAP_01_F";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];

Make a folder called "weapons" inside of admin "admin\weapons"

I will put two examples of guns here but again make sure the identifiers match in guns.sqf and these!!

mx.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addMagazine 'mag name'; // I didnt look up the mag name
GearAdd addMagazine 'mag name'; // I didnt look up the mag name
GearAdd addMagazine 'mag name'; // I didnt look up the mag name

ebr.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'srifle_EBR_F';
GearAdd addMagazine 'mag name'; // I didnt look up the mag name
GearAdd addMagazine 'mag name'; // I didnt look up the mag name
GearAdd addMagazine 'mag name'; // I didnt look up the mag name

THIS IS A VERY BASIC MENU that does the job. You don't need anything more or less to be honest. If you have any questions please let me know. I hope this helped someone :D

#####ALL VEHICLE CLASS NAMES#####

https://docs.google.com/document/d/1sI3szZq9RLob7OVyUhxX32Gc6D04TUro_LOvHJ7V57g/edit?usp=sharing

##########Download##########

bdkDVAf.png

####Added Heal Other Players and A COMPLETE MAKEOVER!####

Edited by Fusion13

Share this post


Link to post
Share on other sites

Pretty cool. Would be useful for testing.

For god mode, you could do

player allowDamage false;

This will also allow you to turn it off easily.

Share this post


Link to post
Share on other sites
Pretty cool. Would be useful for testing.

For god mode, you could do

player allowDamage false;

This will also allow you to turn it off easily.

I Actullay had tried that and for some reason it wouldn't work. ###Edit Of course now it dose:P ###

Edited by Fusion13

Share this post


Link to post
Share on other sites

mx.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addmagazines ["30Rnd_65x39_caseless_mag",3]; // I did look up the mag name
player removeAction gun;
player removeAction gun1;

ebr.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addmagazines ["20Rnd_762x51_Mag",3]; // I did look up the mag name
player removeAction gun;
player removeAction gun1;

Share this post


Link to post
Share on other sites
mx.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I did look up the mag name
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I did look up the mag name
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I did look up the mag name
player removeAction gun;
player removeAction gun1;

ebr.sqf

GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addMagazine '20Rnd_762x51_Mag'; // I did look up the mag name
GearAdd addMagazine '20Rnd_762x51_Mag'; // I did look up the mag name
GearAdd addMagazine '20Rnd_762x51_Mag'; // I did look up the mag name
player removeAction gun;
player removeAction gun1;

Yea loll I got too lazy :P Thanks for that :P

Share this post


Link to post
Share on other sites

Great toolkit! Few suggestions:

Instead of using:

player addAction ["----------",{execVM "";}];

You can use:

player addAction ["----------",nil];

To make it jump out, try add some color:

player addAction ["<t color='#008080'>God Mode</t>",{execVM "admin\tools\god.sqf";}];

Share this post


Link to post
Share on other sites
Great toolkit! Few suggestions:

Instead of using:

player addAction ["----------",{execVM "";}];

You can use:

player addAction ["----------",nil];

To make it jump out, try add some color:

player addAction ["<t color='#008080'>God Mode</t>",{execVM "admin\tools\god.sqf";}];

Yea I have that on my arma 2 admin menu, I don't know all other colors looks TOOO dark so I stayed with white :P And thanks for the Thanks :PP

Share this post


Link to post
Share on other sites

Just a suggestion but you could get rid of the loop if you used a Respawn EventHandler like so:

init.sqf

if ((getPlayerUID player) in ["YOUR UID HERE USE COMMAS FOR DIFFERENT UIDS"]) then {
execVM "admin/activate.sqf";
player addEventHandler ["Respawn", {_this execVM "admin\activate.sqf"}];
};

and in the activate.sqf

waitUntil {alive vehicle player};
act = player addAction ["Tools",{execVM "tools.sqf";}];

Should get rid of the double menus also : )

Edited by terrence

Share this post


Link to post
Share on other sites
Just a suggestion but you could get rid of the loop if you used a Respawn EventHandler like so:

init.sqf

if ((getPlayerUID player) in ["YOUR UID HERE USE COMMAS FOR DIFFERENT UIDS"]) then {
execVM "admin/activate.sqf";
player addEventHandler ["Respawn", {_this execVM "admin\activate.sqf"}];
};

and in the activate.sqf

waitUntil {alive vehicle player};
act = player addAction ["Tools",{execVM "tools.sqf";}];

Should get rid of the double menus also : )

I will try that to see how it goes and I believe with this there is no need for my loop.sqf right??

Share this post


Link to post
Share on other sites

Ya no need for the loop if you use the EH. The code will run the activate.sqf when you first join and every time you respawn so you should always have your menu.

Edited by terrence

Share this post


Link to post
Share on other sites
Ya no need for the loop if you use the EH. It will run the activate.sqf when you first join and every time you respawn so you should always have your menu.

Sweet man thanks I might update it to that if you don't mind :D

Share this post


Link to post
Share on other sites
Ya go ahead man just here to help :)

Thanks man! Will update it sometime later :D

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the script package :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

HUGE UPDATE! COMPLETELY REDONE INTERFACE! Check it out,

###Link Is Not Up To Date Yet###

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the newest version of your script package :cool:

Release frontpaged on the Armaholic homepage.

===============================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hey Fusion13,

Thank you for the great script mod

Edit: I found out where to get the ID to enable the script UI in the scroll menu. I'm getting empty variables from the god mode/atv/hunter/offroad armed/vehicle god mode. The weapons are all working good and no empty variables.

Thanks :)

Edited by ARMA3FlyGun1

Share this post


Link to post
Share on other sites

Did you enter it into the activate, and the tools.sqf? I had no issues. Let me know because you do have to enter it into bot parts of the tools.sqf

And to be sure what is happening is that when you open the menu, and click tools, godmode etc it won't activate?

Edited by Fusion13

Share this post


Link to post
Share on other sites

Tools.sqf-

if ((getPlayerUID player) in ["76561198062438563"]) then { //all admins
if ((getPlayerUID player) in ["76561198062438563"]) then { //Admins Go Here aswell

Activate.sqf-

if ((getPlayerUID player) in ["76561198062438563"]) then {

Above is how they look right now.

God mode works for using the player one, but returns an empty variable error--

Error Undefined variable in expression: line1
File C:\Users\Gene\Documents\Arma 3\mpmissions\Altis%20Mission%20WIP.Altis\fusionsmenu\admin\tools\cargod.sqf, line 3

Error Undefined variable in expression: line1
File C:\Users\Gene\Documents\Arma 3\mpmissions\Altis%20Mission%20WIP.Altis\fusionsmenu\admin\tools\god.sqf, line 4

Error Undefined variable in expression: car
File C:\Users\Gene\Documents\Arma 3\mpmissions\Altis%20Mission%20WIP.Altis\fusionsmenu\admin\veh\ATV.sqf, line 6

Error in expression <_spwnveh setVariable ["Sarge",1,true];
laptop removeAction car1;
laptop removeA>
Error position: <laptop removeAction car1;
laptop removeA>

Error Undefined variable in expression: laptop
File C:\Users\Gene\Documents\Arma 3\mpmissions\Altis%20Mission%20WIP.Altis\fusionsmenu\admin\veh\offroad.sqf, line 6

---------- Post added at 01:11 PM ---------- Previous post was at 01:05 PM ----------

Also wondering if I added vehicles to the spawn list correctly? :)

		["ATV", [2],  "", -5, [["expression", format[_EXECscript5,"ATV.sqf"]]], "1", "1"],
	["Hunter Armed", [3],  "", -5, [["expression", format[_EXECscript5,"hunter.sqf"]]], "1", "1"],
	["Offroad Truck HMG .50", [4],  "", -5, [["expression", format[_EXECscript5,"offroad.sqf"]]], "1", "1"],
	["AMV7_Marshall", [4],  "", -5, [["expression", format[_EXECscript5,"AMV7_Marshall.sqf"]]], "1", "1"],
	["Armed Offroad", [4],  "", -5, [["expression", format[_EXECscript5,"Armed Offroad.sqf"]]], "1", "1"],
	["BTR_K_Kamysh", [4],  "", -5, [["expression", format[_EXECscript5,"BTR_K_Kamysh.sqf"]]], "1", "1"],
	["CH_49_Mohawk", [4],  "", -5, [["expression", format[_EXECscript5,"CH_49_Mohawk.sqf"]]], "1", "1"],
	["Hatchback_Sport", [4],  "", -5, [["expression", format[_EXECscript5,"Hatchback_Sport.sqf"]]], "1", "1"],
	["HEMTT", [4],  "", -5, [["expression", format[_EXECscript5,"HEMTT.sqf"]]], "1", "1"],
	["IFV6_Cheetah", [4],  "", -5, [["expression", format[_EXECscript5,"IFV6_Cheetah.sqf"]]], "1", "1"],
	["LFRIT_HMG", [4],  "", -5, [["expression", format[_EXECscript5,"LFRIT_HMG.sqf"]]], "1", "1"],
	["LFRIT_Unarmed", [4],  "", -5, [["expression", format[_EXECscript5,"LFRIT_Unarmed.sqf"]]], "1", "1"],
	["M2A1_Slammer", [4],  "", -5, [["expression", format[_EXECscript5,"M2A1_Slammer.sqf"]]], "1", "1"],

Share this post


Link to post
Share on other sites

Yes you did add them good, But In what program are you getting these errors?

Share this post


Link to post
Share on other sites

Arma 3 multiplayer mode with a mission i created with Development branch.

When I spawn the vehicle they show up but I get the black error window popup.

All the weapons work without a single error.

The healing works without error

Just God mode-player/vehicle, spawning the ATV/Offroad/Hunter.

Checked the Atv.sqf and it has the version 1.0 still in it, where as the offroad is completely different--

ATV--

_spawn = "B_G_Quadbike_01_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
player removeAction car;
player removeAction car1;
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay;

Offroad--

_spawn = "B_G_Offroad_01_armed_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
laptop removeAction car1;
laptop removeAction car2;
laptop removeAction car3;
laptop removeAction car4;
laptop removeAction car5;
laptop removeAction car6;

Share this post


Link to post
Share on other sites

offroad.sqf

_spawn = "B_G_Offroad_01_armed_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];

atv.sqf

_spawn = "B_G_Quadbike_01_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];

Add me on skype. fusionquinny

Share this post


Link to post
Share on other sites

Would it be possible to add a script that controls the time of day/weather/wave height? :)

Thanks!

(My favorite script mod) :)

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

×