Forum Jump :

Author Message


Posts: 13
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: Fusion13

 
#1 Posted at 2013-12-04 00:49        
     
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##########

Download

####Added Heal Other Players and made the menu just a bit better to use####

This post was edited by Fusion13 (2013-12-08 05:27, ago)

I like boobies

Author Message


Posts: 20253
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#2 Posted at 2013-12-06 00:04        
     
Not sure if the above post is fully up to date but if you could release all these scripts in one pack (which you keep updated) we could add it to our downloads section.
Right now it is pretty much impossible for us as they are all small scripts and you seem to have updated things (on the BI forums) and keeping track of small text changes is impossible for us due to all the work this website already requires.

Let me know if such a script pack is something you are willing to do or not. I am not forcing you to do it, and you can of course just stick to a thread only.
Just asking ;-)

This post was edited by Foxhound (2013-12-06 08:19, ago)

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 13
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: Fusion13

 
#3 Posted at 2013-12-06 23:36        
     
# Foxhound : Not sure if the above post is fully up to date but if you could release all these scripts in one pack (which you keep updated) we could add it to our downloads section.
Right now it is pretty much impossible for us as they are all small scripts and you seem to have updated things (on the BI forums) and keeping track of small text changes is impossible for us due to all the work this website already requires.

Let me know if such a script pack is something you are willing to do or not. I am not forcing you to do it, and you can of course just stick to a thread only.
Just asking ;-)

Sure let me get some things up to date here and I'll do it :D

I like boobies

Author Message


Posts: 20253
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#4 Posted at 2013-12-07 09:15        
     
Thanks for sending us the release :-)
News is up on the frontpage and you can find our mirror here:



This post was edited by Foxhound (2013-12-08 22:42, ago)

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 41
Rank:


Level: Member

Country: de
Location: Berlin
Occupation: public service
Age:
In-game name: vendaar

 
#5 Posted at 2014-03-15 23:53        
     
Doesnt seem to work on altis life rpg :(
I downloaded "Admin Menu for training servers v1.2"

My Init.sqf:


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

enableSaving [false, false];

X_Server = false;
X_Client = false;
X_JIP = false;
StartProgress = false;

if(!isDedicated) then { X_Client = true;};
/*
if(isNull player) then
{
if(!X_JIP && !isServer) then
{
[] spawn (compile PreprocessFileLineNumbers "core\jip.sqf");
};
X_JIP = true;
};
*/
enableSaving[false,false];

life_versionInfo = "Altis Life RPG v3.1.1";
/*
if(X_Client) then
{
[] execVM "core\init.sqf";
};
*/
[] execVM "briefing.sqf"; //Load Briefing
[] execVM "KRON_Strings.sqf";

if(!StartProgress) then
{
[8,true,false] execFSM "core\fsm\core_time.fsm";
};
StartProgress = true;



And my activate.sqf


waituntil {!alive player ; !isnull (finddisplay 46)};
if ((getPlayerUID player) in ["3165a9ba36745d6929171556d31bca16"]) then {
;
act = player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"fusionsmenu\admin\tools.sqf","",5,false,true,"",""];

};

The german Arma community "Kampfverband Fuchs" is looking for players who are interested in tactical gameplay and learning specific tactics in infantry combat. We also provide vehicle experiences. Many selfbuild missions, periodical operations, participating in big events

Author Message


Posts: 1
Rank:


Level: Member

Country: be
Location:
Occupation:
Age: 27
In-game name: orry_vh@msn.com

 
#6 Posted at 2014-08-06 03:21        
     
for me it works whit some editing and setting it up for yourself what admins wil get what menu and how many pages etc etc
thanks!


Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2014-11-12 17:47        
     
2 questions.
1)does this work on stratis wasteland?
2)where do I put the admin file so it will work on my server.


Author Message


Posts: 21
Rank:


Level: Member

Country: us
Location: California
Occupation:
Age: 19
In-game name: [OPR] Expenox

 
#8 Posted at 2014-11-15 02:19        
     
# Vendaar : Doesnt seem to work on altis life rpg :(
I downloaded "Admin Menu for training servers v1.2"

My Init.sqf:


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

enableSaving [false, false];

X_Server = false;
X_Client = false;
X_JIP = false;
StartProgress = false;

if(!isDedicated) then { X_Client = true;};
/*
if(isNull player) then
{
if(!X_JIP && !isServer) then
{
[] spawn (compile PreprocessFileLineNumbers "core\jip.sqf");
};
X_JIP = true;
};
*/
enableSaving[false,false];

life_versionInfo = "Altis Life RPG v3.1.1";
/*
if(X_Client) then
{
[] execVM "core\init.sqf";
};
*/
[] execVM "briefing.sqf"; //Load Briefing
[] execVM "KRON_Strings.sqf";

if(!StartProgress) then
{
[8,true,false] execFSM "core\fsm\core_time.fsm";
};
StartProgress = true;



And my activate.sqf


waituntil {!alive player ; !isnull (finddisplay 46)};
if ((getPlayerUID player) in ["3165a9ba36745d6929171556d31bca16"]) then {
;
act = player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"fusionsmenu\admin\tools.sqf","",5,false,true,"",""];

};

You used your GUID, not your Player ID. To find your player ID go to the main menu then Configuration > Profile > Player ID.

Hope this helped!

Added 1 minute later:

# TheButcher : 2 questions.
1)does this work on stratis wasteland?
2)where do I put the admin file so it will work on my server.
Should work on any mission, and you put the fusionsmenu folder where you server is located.

[url=http://www.gametracker.com/server_info/108.23.112.124:2302/][/url]

Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#9 Posted at 2014-11-17 09:12        
     
I'm using something similar on my own server (though it's not currently in a state that I would release to the public).

Anyway, here's the thing:
I really wouldn't recommend putting all that stuff in the action-menu. That thing is clumsy enough as it is already.

There are better options.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 21
Rank:


Level: Member

Country: us
Location: California
Occupation:
Age: 19
In-game name: [OPR] Expenox

 
#10 Posted at 2014-11-22 03:33        
     
# Tajin : I'm using something similar on my own server (though it's not currently in a state that I would release to the public).

Anyway, here's the thing:
I really wouldn't recommend putting all that stuff in the action-menu. That thing is clumsy enough as it is already.

There are better options.

How could I do this another way? Because I don't like it there either.. I've tried to add it to the altis life admin menu, but nothing really worked. (Followed a tut) The teleport wouldn't work because it didn't close the player menu, giving money didn't work.. (Compensation). Then again it was something completely different.. but yeah could you help me remove it from the action menu?

[url=http://www.gametracker.com/server_info/108.23.112.124:2302/][/url]

Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#11 Posted at 2014-11-24 09:30        
     
Using dialogs is one way.
(slightly complex but all info on that is available on the forums and the wiki)
http://forums.bistudio.com/showthread.php?144954-Dialog-Tutorial-For-Noobs-By-A-Noob


Another way is to create a text-based menu inside a task-entry.
(somewhat easy to do but also rather limited and really uncommon It involves some dark-magic that was formerly found in https://community.bistudio.com/wiki/createDiaryRecord)

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 1
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#12 Posted at 2015-01-04 04:19        
     
where do i put the folders


Author Message


Posts: 2
Rank:


Level: Member

Country: nl
Location:
Occupation:
Age:
In-game name:

 
#13 Posted at 2015-02-03 10:48        
     
hey man is it possible that u add this to ure menu:

teleport me to player,

so instead of me to player i wanna tp the player to me.

thx,


very nice work man!

-v3


Author Message


Posts: 1
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#14 Posted at 2016-08-15 15:18        
     
I like this script very much but it contains a lot of errors. So I made a corrected version, you can find it under http://www.armaholic.com/page.php?id=31459


Author Message


Posts: 20253
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#15 Posted at 2016-08-17 09:32        
     
Thanks for sharing the improved version with us :-)
I have frontpaged your new version and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.