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
loop.sqf
NOW THE IMPORTANT PART INSIDE OF THE INIT.SQF MAKE A LINE WITH THE FOLLOWING CODE
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
Place inside admin\tools
god.sqf
teleport.sqf
heal.sqf
Yes I know its a little weird that I have the hints but I wanted it to be cooler :P
healp.sqf
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
hunter.sqf
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
ebr.sqf
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#####
This is all made by me..
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
Code:
if ((getPlayerUID player) in ["YOUR UID HERE USE COMMAS FOR DIFFERENT UIDS"]) then {
;
act = player addAction ["Tools",{execVM "fusionsmenu\admin\tools.sqf";}];
};Code:
while {true} do
{
waitUntil {alive vehicle player};
[] execVM "fusionsmenu\admin\activate.sqf";
waitUntil {!alive player};
};Code:
execVM "fusionsmenu\admin\loop.sqf
execVM "fusionsmenu\admin\activate.sqf"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
Code:
_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";god.sqf
Code:
cutText ["Godmode activated.", "PLAIN"];
player removeAllEventHandlers "handleDamage";
player addEventHandler ["handleDamage", {false}];Code:
cutText ["Click somewhere on the map to move there", "PLAIN"];
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';true;";Code:
hint format ["Healing..."];
sleep 2;
player setDamage 0;
hint format ["Done"];healp.sqf
Code:
//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
Code:
_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];Code:
_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
Code:
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 nameCode:
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#####ALL VEHICLE CLASS NAMES#####
Code:
https://docs.google.com/document/d/1sI3szZq9RLob7OVyUhxX32Gc6D04TUro_LOvHJ7V57g/edit?usp=sharing
Aucun commentaire:
Enregistrer un commentaire