Skip to content

Commit

Permalink
Merge pull request #41 from noxsicarius/master
Browse files Browse the repository at this point in the history
CleanUp & Fixes
  • Loading branch information
noxsicarius committed Mar 16, 2014
2 parents 73f93cb + a13365d commit 5a39ba2
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 57 deletions.
6 changes: 2 additions & 4 deletions admintools/AdminToolsMain.sqf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
_pathtotools = "admintools\tools\";
//_pathtoskins = "admintools\skins\";
_pathtoweapon = "admintools\weaponkits\";
_pathtovehicles = "admintools\vehicles\";
_pathtocrates = "admintools\crates\";
_EXECscript1 = 'player execVM "'+_pathtotools+'%1"';
//_EXECscript2 = 'player execVM "'+_pathtoskins'%1"';
_EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"';
_EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"';
_EXECscript6 = 'player execVM "'+_pathtocrates+'%1"';
Expand Down Expand Up @@ -45,12 +43,12 @@ AdminMenu =
["Teleport To Player", [], "", -5, [["expression", format[_EXECscript1, "TpToPlayer.sqf"]]], "1", "1"],
["Toggle God Mode", [], "", -5, [["expression", format[_EXECscript1,"malplayerGM.sqf"]]], "1", "1"],
["Zombie Shield",[],"",-5,[["expression",format[_EXECscript1,"zombieshield.sqf"]]],"1","1"],
["Toggle Flying", [], "", -5, [["expression", format[_EXECscript1,"malfly.sqf"]]], "1", "1"],
["Humanity Menu >>", [], "#USER:HumanityMenu", -5, [["expression", ""]], "1", "1"],
["Point to Repair (Temp)", [], "", -5, [["expression", format[_EXECscript1,"malpointrepair.sqf"]]], "1", "1"],
["Point to Delete (Perm)",[],"",-5,[["expression",format[_EXECscript1,"DatabaseRemove.sqf"]]],"1","1"],
["Heal (25m)", [], "", -5, [["expression", format[_EXECscript1,"healp.sqf"]]], "1", "1"],
["Invisibility", [], "", -5, [["expression", format[_EXECscript1,"malinvisinit.sqf"]]], "1", "1"],
["Toggle Flying", [], "", -5, [["expression", format[_EXECscript1,"malfly.sqf"]]], "1", "1"],
["Humanity Menu >>", [], "#USER:HumanityMenu", -5, [["expression", ""]], "1", "1"],
["Infinite Ammo", [], "", -5, [["expression", format[_EXECscript1,"malinfammo.sqf"]]], "1", "1"],
["Toggle Grass", [], "", -5, [["expression", format[_EXECscript1,"malgrasson.sqf"]]], "1", "1"],
["", [], "", -5, [["expression", ""]], "1", "0"],
Expand Down
2 changes: 1 addition & 1 deletion admintools/tools/TpToPlayer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (pselect5 != "exit") then
{
if(name _x == _name) then
{
hint format ["Teleporting to %1", _name];
titleText[format["Teleporting to %1", _name],"PLAIN DOWN"];
(vehicle player) attachTo [_x, [2, 2, 0]];
sleep 0.25;
detach (vehicle player);
Expand Down
15 changes: 3 additions & 12 deletions admintools/tools/malgrasson.sqf
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
// Toggle grass on or off
// last edit: NoxSicarius
if(isNil "grassToggle") then{grassToggle = true;} else {grassToggle = !grassToggle;};

if(isNil "grassToggle") then
if (grassToggle) then
{
grassToggle = 0;
};

if (grassToggle == 0) then
{
grassToggle = 1;
cutText ["Grass - OFF", "PLAIN DOWN"];
setterraingrid 50;
}
else
{
grassToggle = 0;
cutText ["Grass - ON", "PLAIN DOWN"];
setterraingrid 25;};
};


};
13 changes: 4 additions & 9 deletions admintools/tools/malinfammo.sqf
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
// Malory's Infinite Ammo

if (isnil "malinfam" ) then {malinfam=0};
if (isnil "malinfam" ) then {malinfam=true;} else {malinfam = !malinfam;};

if (malinfam==0) then
if (malinfam) then
{
malinfam=1;
hint "Infinite Ammo and No Recoil - ON";
while {malinfam==1} do
while {malinfam} do
{
vehicle player setVehicleAmmo 0.99;
vehicle player setUnitRecoilCoefficient 0;
sleep 0.01;
}

}
else
{
hint "Infinite Ammo and No Recoil - OFF";
malinfam=0;
};
else{hint "Infinite Ammo and No Recoil - OFF";};



Expand Down
64 changes: 34 additions & 30 deletions admintools/tools/speedboost.sqf
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
waituntil {!isnull (finddisplay 46)};
(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"];
MY_KEYDOWN_FNC = {
if (isNil "speedToggle") then {speedToggle = true;} else { speedToggle = !speedToggle;};

_vcl = vehicle player;
if(_vcl == player)exitwith{};
if (speedToggle) then {
waituntil {!isnull (finddisplay 46)};
SPEED_UP =(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"];

_nos = _vcl getvariable "nitro";
_supgrade = _vcl getvariable "supgrade";
MY_KEYDOWN_FNC = {

if(isEngineOn _vcl) then
{
switch (_this) do {
case 17: {
if(isEngineOn _vcl and !isnil "_supgrade") then
{
_vcl SetVelocity [(velocity _vcl select 0) * 1.011, (velocity _vcl select 1) *1.011, (velocity _vcl select 2) * 0.99];
} else {
_vcl setvariable ["supgrade", 1, true];
};
};
case 42: {
if(isEngineOn _vcl and !isnil "_nos") then
{
_vcl setVelocity [(velocity _vcl select 0) * 1.01, (velocity _vcl select 1) * 1.01, (velocity _vcl select 2) * 0.99];
} else {
_vcl setvariable ["nitro", 1, true];
};
};
};
};
};
_vcl = vehicle player;
if(_vcl == player)exitwith{};

hint "Speed Boost";
_nos = _vcl getvariable "nitro";
_supgrade = _vcl getvariable "supgrade";

if(isEngineOn _vcl) then
{
switch (_this) do {
case 17: {
if(isEngineOn _vcl and !isnil "_supgrade") then
{
_vcl SetVelocity [(velocity _vcl select 0) * 1.011, (velocity _vcl select 1) *1.011, (velocity _vcl select 2) * 0.99];
} else {_vcl setvariable ["supgrade", 1, true];};
};
case 42: {
if(isEngineOn _vcl and !isnil "_nos") then
{
_vcl setVelocity [(velocity _vcl select 0) * 1.01, (velocity _vcl select 1) * 1.01, (velocity _vcl select 2) * 0.99];
} else {_vcl setvariable ["nitro", 1, true];};
};
};
};
};
titleText ["Speed Boost - ON","PLAIN DOWN"];titleFadeOut 2;
}
else{
(findDisplay 46) displayRemoveEventHandler ["KeyDown", SPEED_UP];
titleText ["Speed Boost - OFF","PLAIN DOWN"];titleFadeOut 2;
};
2 changes: 1 addition & 1 deletion admintools/tools/zombieshield.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (isNil "SheildMe") then {SheildMe = true;} else {SheildMe = !SheildMe};
if (isNil "SheildMe") then {SheildMe = true;} else {SheildMe = !SheildMe;};
if(SheildMe) then {
zombieDistanceScreen =
[
Expand Down

0 comments on commit 5a39ba2

Please sign in to comment.