Jump to content
[IL] KingCrazyHunter

WORKING FEDERAL ARMORY (NATO WEAPONS RESERVE)

Recommended Posts

Authors: Tonic (Didn't change enough within the files to put mine or anyone else's name as an author)

Difficulty: Easy

VersionTested on 5.0 (Could work on 4.4)

(Thank you @TaskForceTactical for the idea of this script)

Description: Similar to the fed but instead of spawning gold bars when successful this will spawn randomized weapons and gear in a crate.

NOTE: To the ungrateful copy paste kids who thinks it's cool to steal credit or try to sell the scripts me or any of my friends created for you guys, if it continues I will no longer help anyone or post scripts to for the community, the only reason why this was released was because it's a small rewrite of Tonic's files.

 

MISSION EDITS:

STEP 1: Find a place for your armory on the map and place a marker and name set federal_armory as the variable name. Now you will need to place a vault, a"CargoNet_01_box_F" works perfectly set the variable name to fed_armory and don't forget to set allowDamage to false, a vaulthouse, I use "Land_Research_house_V1_F" for example, and a dome big or small depends on how you want it. To make it easier I've used this compound within the top right area that's apart of the map all I did was place a vault:

Spoiler

f6ee13459c3823cb47de964f8282621d.thumb.jpg.c9ee7db7980c25e898f9460fad645e0f.jpg

cf9fe079df06a4147058c8c03e688b4a.thumb.jpg.f90e32a7c4dbcfe977741c1eaf4b600f.jpg

 

Step 2: There was a simpler way to do this but I didn't realize until after I made this both ways work the same so go into your fn_useItem.sqf replace "case (_item isEqualTo "blastingcharge"):" with:

Spoiler
case (_item isEqualTo "blastingcharge"): {
        if (cursorObject == fed_armory) then {
            player reveal fed_armory;
            (group player) reveal fed_armory;
            [cursorObject] spawn life_fnc_blastingChargeArmory;
            closeDialog 0;
        } else {
            player reveal fed_bank;
            (group player) reveal fed_bank;
            [cursorObject] spawn life_fnc_blastingCharge;
            closeDialog 0;
        };
    };

 

 

Step 3: Go into your fn_useItem.sqf replace "case (_item isEqualTo "boltcytter"):" with:

Spoiler
case (_item isEqualTo "boltcutter"): {
        [cursorObject] spawn life_fnc_boltcutterarmory;
        closeDialog 0;
    };

 

 

Step 4: You will need to configure this so it's the correct coords to the vault & vaulthouse. Go into core >> items and create the file fn_blastingChargeArmory.sqf and paste this in:

Spoiler
#include "..\..\script_macros.hpp"
/*
    File: fn_blastingChargeArmory.sqf
    Author: Tonic
    Edited by: Jokahghost & Izzi

    Description:
    Blasting charge is used for the federal armory vault and nothing  more.. Yet.
*/
private ["_vault","_handle"];
_vault = param [0,ObjNull,[ObjNull]];

if (isNull _vault) exitWith {}; //Bad object
if (typeOf _vault != "CargoNet_01_box_F") exitWith {hint localize "STR_ISTR_Blast_VaultOnly"};
if (_vault getVariable ["chargeplaced",false]) exitWith {hint localize "STR_ISTR_Blast_AlreadyPlaced"};
if (_vault getVariable ["safe_open",false]) exitWith {hint localize "STR_ISTR_Blast_AlreadyOpen"};
if (_vault getVariable ["robbed",true]) exitWith {hint "The armory has recently been raided and is on lockdown";};
if (west countSide playableUnits < (LIFE_SETTINGS(getNumber,"minimum_cops"))) exitWith {
     hint format [localize "STR_Civ_NotEnoughCops",(LIFE_SETTINGS(getNumber,"minimum_cops"))];
};

private _vaultHouse = [[["Altis", "Land_Research_house_V1_F"], ["Tanoa", "Land_Medevac_house_V1_F"]]] call TON_fnc_terrainSort;
private _altisArray = [20883.957,19245.451,0.733];
private _tanoaArray = [11074.2,11501.5,0.00137329];
private _pos = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;

if ((nearestObject [_pos,_vaultHouse]) getVariable ["locked",true]) exitWith {hint localize "STR_ISTR_Blast_Exploit"};
if (!([false,"blastingcharge",1] call life_fnc_handleInv)) exitWith {}; //Error?

_vault setVariable ["chargeplaced",true,true];
[0,"STR_ISTR_Blast_Placed_Armory",true,[]] remoteExecCall ["life_fnc_broadcast",west];
hint localize "STR_ISTR_Blast_KeepOff";

[] remoteExec ["life_fnc_demoChargeTimerArmory",[west,player]];
[] remoteExec ["TON_fnc_handleBlastingChargeArmory",2];

 

 

Step 5: You will need to configure this also with the same coords as you did in fn_blastingChargeArmory.sqf, create a new file in core >> items called fn_boltcutterarmory.sqf and paste this:

Spoiler
#include "..\..\script_macros.hpp"
/*
    File: fn_boltcutterarmory.sqf
    Author: Bryan "Tonic" Boardwine
	Edited by: Jokahghost & Izzi

    Description:
    Breaks the lock on a single door (Closet door to the player).
*/
private ["_building","_door","_doors","_cpRate","_title","_progressBar","_titleText","_cp","_ui"];
_building = param [0,objNull,[objNull]];

private _vaultHouse = [[["Altis", "Land_Research_house_V1_F"], ["Tanoa", "Land_Medevac_house_V1_F"]]] call TON_fnc_terrainSort;
private _altisArray = [20883.957,19245.451,0.733];
private _tanoaArray = [11074.2,11501.5,0.00137329];
private _pos = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;

if (isNull _building) exitWith {};
if (!(_building isKindOf "House_F")) exitWith {hint localize "STR_ISTR_Bolt_NotNear";};
if (((nearestObject [_pos,"Land_Dome_Big_F"]) == _building || (nearestObject [_pos,_vaultHouse]) == _building) && (west countSide playableUnits < (LIFE_SETTINGS(getNumber,"minimum_cops")))) exitWith {
    hint format [localize "STR_Civ_NotEnoughCops",(LIFE_SETTINGS(getNumber,"minimum_cops"))];
};
if ((typeOf _building) == _vaultHouse && (nearestObject [_pos,"Land_Dome_Big_F"]) getVariable ["locked",true]) exitWith {hint localize "STR_ISTR_Bolt_Exploit"};
if (isNil "life_boltcutter_uses") then {life_boltcutter_uses = 0;};

_doors = FETCH_CONFIG2(getNumber,"CfgVehicles",(typeOf _building),"numberOfDoors");
_door = 0;
//Find the nearest door
for "_i" from 1 to _doors do {
    _selPos = _building selectionPosition format ["Door_%1_trigger",_i];
    _worldSpace = _building modelToWorld _selPos;
        if (player distance _worldSpace < 2) exitWith {_door = _i;};
};
if (_door isEqualTo 0) exitWith {hint localize "STR_Cop_NotaDoor"}; //Not near a door to be broken into.
if ((_building getVariable [format ["bis_disabled_Door_%1",_door],0]) isEqualTo 0) exitWith {hint localize "STR_House_Raid_DoorUnlocked"};

if ((nearestObject [_pos,"Land_Dome_Big_F"]) == _building || (nearestObject [_pos,_vaultHouse]) == _building) then {
    if (fed_armory getVariable ["robbed",true]) exitWith {hint "The armory has recently been raided and is on lockdown!";};
    [[1,2],"STR_ISTR_Bolt_AlertArmory",true,[]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
} else {
    player playActionNow "stop";
    life_action_inUse = false;
    if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
    [cursorObject] spawn life_fnc_boltcutter;
};

life_action_inUse = true;
//Setup the progress bar
disableSerialization;
_title = localize "STR_ISTR_Bolt_Process";
"progressBar" cutRsc ["life_progress","PLAIN"];
_ui = uiNamespace getVariable "life_progress";
_progressBar = _ui displayCtrl 38201;
_titleText = _ui displayCtrl 38202;
_titleText ctrlSetText format ["%2 (1%1)...","%",_title];
_progressBar progressSetPosition 0.01;
_cP = 0.01;

switch (typeOf _building) do {
    case "Land_Dome_Big_F": {_cpRate = 0.003;};
    case "Land_Medevac_house_V1_F";
    case "Land_Research_house_V1_F": {_cpRate = 0.0015;};
    default {_cpRate = 0.08;}
};

for "_i" from 0 to 1 step 0 do {
    if (animationState player != "AinvPknlMstpSnonWnonDnon_medic_1") then {
        [player,"AinvPknlMstpSnonWnonDnon_medic_1",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
        player switchMove "AinvPknlMstpSnonWnonDnon_medic_1";
        player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1";
    };
    uiSleep 0.26;
    if (isNull _ui) then {
        "progressBar" cutRsc ["life_progress","PLAIN"];
        _ui = uiNamespace getVariable "life_progress";
        _progressBar = _ui displayCtrl 38201;
        _titleText = _ui displayCtrl 38202;
    };
    _cP = _cP + _cpRate;
    _progressBar progressSetPosition _cP;
    _titleText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_title];
    if (_cP >= 1 || !alive player) exitWith {};
    if (life_istazed) exitWith {}; //Tazed
    if (life_isknocked) exitWith {}; //Knocked
    if (life_interrupted) exitWith {};
};

//Kill the UI display and check for various states
"progressBar" cutText ["","PLAIN"];
player playActionNow "stop";
if (!alive player || life_istazed || life_isknocked) exitWith {life_action_inUse = false;};
if (player getVariable ["restrained",false]) exitWith {life_action_inUse = false;};
if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
life_boltcutter_uses = life_boltcutter_uses + 1;
life_action_inUse = false;

if (life_boltcutter_uses >= 5) then {
    [false,"boltcutter",1] call life_fnc_handleInv;
    life_boltcutter_uses = 0;
};

_building setVariable [format ["bis_disabled_Door_%1",_door],0,true]; //Unlock the door.
_building setVariable ["locked",false,true];

if (life_HC_isActive) then {
    [getPlayerUID player,profileName,"459"] remoteExecCall ["HC_fnc_wantedAdd",HC_Life];
} else {
    [getPlayerUID player,profileName,"459"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
};

 

 

Step 6: go into core >> civilian and create a file called fn_demoChargeTimerArmory.sqf and paste this: 

Spoiler
#include "..\..\script_macros.hpp"
/*
    File: fn_demoChargeTimerArmory.sqf
    Author: Tonic
    Edited by: Jokahghost & Izzi

    Description:
    Starts the "Demo" timer for the police.
*/
private ["_uiDisp","_time","_timer"];
disableSerialization;
"lifeTimer" cutRsc ["life_timer","PLAIN"];
_uiDisp = uiNamespace getVariable "life_timer";
_timer = _uiDisp displayCtrl 38301;
_time = time + (20 * 60); // Set the time you want before the bomb goes off 20 * 60 = 20 minutes

for "_i" from 0 to 1 step 0 do {
    if (isNull _uiDisp) then {
        "lifeTimer" cutRsc ["life_timer","PLAIN"];
        _uiDisp = uiNamespace getVariable "life_timer";
        _timer = _uiDisp displayCtrl 38301;
    };
    if (round(_time - time) < 1) exitWith {};
    if (!(fed_armory getVariable ["chargeplaced",false])) exitWith {};
    _timer ctrlSetText format ["%1",[(_time - time),"MM:SS.MS"] call BIS_fnc_secondsToString];
    sleep 0.08;
};
"lifeTimer" cutText["","PLAIN"];

 

Step 7: Open you Functions.hpp and under "class Items {" add

Spoiler
class blastingChargeArmory {};
class boltcutterarmory {};

 

Under "class Civilian {" add

Spoiler
class demoChargeTimerArmory {};

 

 

Step 7.5: heres what mine looks like:

Spoiler
class Items {
        file = "core\items";
        class blastingCharge {};
        class blastingChargeArmory {};
        class boltcutter {};
        class boltcutterarmory {};
        class defuseKit {};
        class flashbang {};
        class jerrycanRefuel {};
        class jerryRefuel {};
        class lockpick {};
        class placestorage {};
        class spikeStrip {};
        class storageBox {};
    };
class Civilian {
        file = "core\civilian";
        class civLoadout {};
        class civMarkers {};
        class demoChargeTimer {};
        class demoChargeTimerArmory {};
        class freezePlayer {};
        class jail {};
        class jailMe {};
        class jailTp {};
        class knockedOut {};
        class knockoutAction {};
        class removeLicenses {};
        class robPerson {};
        class robReceive {};
        class tazed {};
    };

 

 

Step 8: Open your CfgRemoteExec.hpp and add

Spoiler
F(life_fnc_demoChargeTimerArmory,ANYONE)
F(TON_fnc_handleBlastingChargeArmory,SERVER)

 

 

LIFE_SERVER EDITS:

Step 1: This step locks your doors and prevents exploiting it will need configuring with the same coordinates as Step 5 and Step 4 of the mission edits. Open your init.sqf and add this above "/* Setup the federal reserve building(s) */":

Spoiler
/* Setup the federal armory building(s) */
private _vaultHouse1 = [[["Altis", "Land_Research_house_V1_F"], ["Tanoa", "Land_Medevac_house_V1_F"]]] call TON_fnc_terrainSort;
private _altisArray1 = [20883.957,19245.451,0.733];
private _tanoaArray1 = [11074.2,11501.5,0.00137329];
private _pos1 = [[["Altis", _altisArray1], ["Tanoa", _tanoaArray1]]] call TON_fnc_terrainSort;

_dome1 = nearestObject [_pos1,"Land_Dome_Big_F"];
_rsb1 = nearestObject [_pos1,_vaultHouse1];

for "_i" from 1 to 3 do {_dome1 setVariable [format ["bis_disabled_Door_%1",_i],1,true]; _dome1 animateSource [format ["Door_%1_source", _i], 0];};
_dome1 setVariable ["locked",true,true];
_rsb1 setVariable ["locked",true,true];
_rsb1 setVariable ["bis_disabled_Door_1",1,true];
_dome1 allowDamage false;
_rsb1 allowDamage false;

 

 

Step 2: Go into Functions >> Sytems and create a new file called "fn_handleBlastingChargeArmory.sqf" this is where all the magic happens you're free to edit whatever you paste this:

Spoiler
/*
    File: fn_blastingChargeArmory.sqf
    Author: Tonic, Izzi & Jokahghost

    Description:
    Handles fed explosion and spawns loot when successful.
*/
private ["_bomb","_time"];
_marker = getMarkerPos "federal_armory"; //Creates a marker indicating that the robbery is still active
createMarker ["Markerarm", _marker];
"Markerarm" setMarkerColor "ColorRed";
"Markerarm" setMarkerText "!! Active Robbery !!";
"Markerarm" setMarkerType "Mil_dot";
createMarker ["Markerarmc", _marker];
"Markerarmc" setMarkerColor "ColorRed";
"Markerarmc" setMarkerShape "Ellipse";
"Markerarmc" setMarkerSize [600,600]; // the size of the KOS zone
_time = time + (20 * 60); //Set this as the same time you set in demoChargeTimerArmory.sqf
waitUntil{(round(_time - time) < 1)};
sleep 0.9;
if (!(fed_armory getVariable["chargeplaced",false])) exitWith {{deleteMarker "Markerarm";deleteMarker "Markerarmc";} forEach allPlayers;};

_bomb = "Bo_GBU12_LGB_MI10" createVehicle [getPosATL fed_armory select 0, getPosATL fed_armory select 1, (getPosATL fed_armory select 2)+0.5];
fed_armory setVariable ["chargeplaced",false,true];
fed_armory setVariable ["safe_open",true,true];
fed_armory setVariable ["locked",false,true];
fed_armory setVariable ["robbed",true,true];

clearWeaponCargoGlobal fed_armory;
clearMagazineCargoGlobal fed_armory;
clearItemCargoGlobal fed_armory;
clearBackpackCargoGlobal fed_armory;

sleep 0.3;

_var=floor(random 6);
if (_var==0) then {fed_armory addWeaponCargoGlobal ["arifle_AK12_F", 2]; fed_armory addWeaponCargoGlobal ["CUP_arifle_Mk16_CQC", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_XM8_Carbine_FG", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_FNFAL", 1]; fed_armory addMagazineCargoGlobal ["CUP_30Rnd_556x45_Stanag", 20]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_FNFAL_M", 20];};
if (_var==1) then {fed_armory addWeaponCargoGlobal ["arifle_CTAR_ghex_F", 1]; fed_armory addMagazineCargoGlobal ["Titan_AA", 4]; fed_armory addWeaponCargoGlobal ["CUP_arifle_FNFAL_railed", 1]; fed_armory addWeaponCargoGlobal ["CUP_arifle_L85A2", 1]; fed_armory addMagazineCargoGlobal ["CUP_30Rnd_556x45_Stanag", 20]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_FNFAL_M", 20];};
if (_var==2) then {fed_armory addWeaponCargoGlobal ["launch_B_Titan_F", 2]; fed_armory addWeaponCargoGlobal ["CUP_launch_M136", 2]; fed_armory addWeaponCargoGlobal ["CUP_arifle_CZ805_B", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_L129A1_HG", 1]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_CZ805B", 20]; fed_armory addMagazineCargoGlobal ["CUP_M136_M", 6]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_L129_M", 20]; fed_armory addMagazineCargoGlobal ["CUP_100Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M", 6]; fed_armory addMagazineCargoGlobal ["CUP_20Rnd_762x51_L129_M", 20];};
if (_var==3) then {fed_armory addWeaponCargoGlobal ["launch_RPG32_F", 15]; fed_armory addWeaponCargoGlobal ["CUP_srifle_SVD_des_ghillie_pso", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_AWM_des", 2]; fed_armory addWeaponCargoGlobal ["CUP_srifle_M107_Base", 1]; fed_armory addWeaponCargoGlobal ["srifle_DMR_02_F", 1]; fed_armory addMagazineCargoGlobal ["CUP_10Rnd_762x54_SVD_M", 15]; fed_armory addMagazineCargoGlobal ["10Rnd_338_Mag", 10]; fed_armory addMagazineCargoGlobal ["CUP_10Rnd_127x99_m107", 10]; fed_armory addMagazineCargoGlobal ["CUP_5Rnd_86x70_L115A1", 10];};
if (_var==4) then {fed_armory addWeaponCargoGlobal ["LMG_Zafir_F", 2]; fed_armory addWeaponCargoGlobal ["optic_LRPS", 2]; fed_armory addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag", 10]; fed_armory addMagazineCargoGlobal ["5Rnd_127x108", 10];};
if (_var==5) then {fed_armory addWeaponCargoGlobal ["MMG_02_black_F", 10]; fed_armory addWeaponCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag", 5]; fed_armory addWeaponCargoGlobal ["muzzle_snds_H", 1]; fed_armory addWeaponCargoGlobal ["muzzle_snds_acp", 1];};
sleep 300; //Waits 5 minutes after the bomb has exploded assuming the robbers have already gotten what they came for

{
	deleteMarker "Markerarm";
	deleteMarker "Markerarmc";
} forEach allPlayers;

sleep 600; //waits another 10 minutes before everything in the vault gets cleared
clearWeaponCargoGlobal fed_armory;
clearMagazineCargoGlobal fed_armory;
clearItemCargoGlobal fed_armory;
clearBackpackCargoGlobal fed_armory;

fed_armory setVariable ["chargeplaced",false,true];
fed_armory setVariable ["safe_open",false,true];
fed_armory setVariable ["locked",true,true];

_marker = getMarkerPos "federal_armory"; //This is used to indicate that the armory has recently been robbed and can't be robbed again for some time
createMarker ["Markerarms", _marker];
"Markerarms" setMarkerColor "ColorOrange";
"Markerarms" setMarkerText "Elevated Security";
"Markerarms" setMarkerType "Mil_dot";
createMarker ["Markerarmsc", _marker];
"Markerarmsc" setMarkerColor "ColorOrange";
"Markerarmsc" setMarkerShape "Ellipse";
"Markerarmsc" setMarkerSize [600,600];

sleep 3600; //waits an hour before it can be robbed again
{
	deleteMarker "Markerarms";
	deleteMarker "Markerarmsc";
} forEach allPlayers;
fed_armory setVariable ["robbed",false,true];

 

 

Step 3: Last but not last open your config.cpp and add this under "class Systems {" under "class TON_System {"

Spoiler
class handleBlastingChargeArmory {};

 

Step 3.5: here is what yours should look like

Spoiler
class TON_System {
        tag = "TON";
        class Systems {
            file = "\life_server\Functions\Systems";
            class managesc {};
            class cleanup {};
            class huntingZone {};
            class getID {};
            class vehicleCreate {};
            class spawnVehicle {};
            class getVehicles {};
            class vehicleStore {};
            class vehicleDelete {};
            class spikeStrip {};
            class transferOwnership {};
            class federalUpdate {};
            class chopShopSell {};
            class clientDisconnect {};
            class cleanupRequest {};
            class setObjVar {};
            class keyManagement {};
            class vehicleUpdate {};
            class recupkeyforHC {};
            class handleBlastingCharge {};
            class handleBlastingChargeArmory {};
            class terrainSort {};
        };

 

 

  • Like 6
  • Thanks 2

Share this post


Link to post
Share on other sites

There were some minor issues still with the script, we managed to fix it but had help from a guy who knows what he's doing (I can't do shit ^^) To the copy/pasta guys out there, get someone to help you :)
Awesome job tho, thanks alot @[IL] KingCrazyHunter :) 

Edited by Moses101

Share this post


Link to post
Share on other sites

The things I know about is that the vault is default open, aswell as the vehicle you get. Maybe the vehicle are supposed to be open by default but the vault seems weird. Also the front door to the dome is default open. 
No bigger issues, just some minor stuff like that.

Share this post


Link to post
Share on other sites

The issues I found was, 

In fn_blastingChargeArmory you load in modded weapons and I think its better to use a switch instead of ifs like this.

Spoiler
_var = floor(random 4);
switch (_var) do {
    case (0): {
      fed_armory addWeaponCargoGlobal ["hgun_PDW2000_F", 2];
        fed_armory addMagazineCargoGlobal ["30Rnd_45ACP_Mag_SMG_01", 20];
        fed_armory addItemCargoGlobal ["optic_ACO_grn", 3];
    };
    case (1): {
      fed_armory addWeaponCargoGlobal ["arifle_Mk20_F", 2];
        fed_armory addMagazineCargoGlobal ["30Rnd_65x39_caseless_green", 10];
        fed_armory addItemCargoGlobal ["optic_ACO_grn", 2];
    };
};

 

 And in fn_boltcutterArmory and fn_blastingChargeArmory this needs to be changed.

Spoiler

From: 

if (fed_armory getVariable ["robbed",true]) exitWith {hint "The armory has recently been raided and is on lockdown!";};

and: 

if (_vault getVariable ["robbed",true]) exitWith {hint "The armory has recently been raided and is on lockdown";};

To: 

if (fed_armory getVariable ["robbed",false]) exitWith {hint "The armory has recently been raided and is on lockdown!";};

and:

if (_vault getVariable ["robbed",false]) exitWith {hint "The armory has recently been raided and is on lockdown";};

 

And in fn_useItem we might still want to use the old boltcutter for the bank

Spoiler
case (_item isEqualTo "boltcutter"): {
      if ((player distance fed_armory) < 100) then {
        [cursorObject] spawn life_fnc_boltcutterArmory;
        closeDialog 0;
      } else {
        [cursorObject] spawn life_fnc_boltcutter;
        closeDialog 0;
      };
    };

 

@[IL] KingCrazyHunter 

  • Like 2

Share this post


Link to post
Share on other sites
16 minutes ago, [IL] KingCrazyHunter said:

@Goatis @ CvGaming.Net the old one still works look in boltcutter armory.sqf

I won’t because you set different cords for armory and have added checks for armory only, but anyway I use my solution because I chose to have the armory checks on our rebels (opfor). 

Anyway thanks for sharing! :) 

Share this post


Link to post
Share on other sites
9 minutes ago, Goatis @ CvGaming.Net said:

I won’t because you set different cords for armory and have added checks for armory only, but anyway I use my solution because I chose to have the armory checks on our rebels (opfor). 

Anyway thanks for sharing! :) 

the armory but if false it will call to the default file

Share this post


Link to post
Share on other sites
6 minutes ago, [IL] KingCrazyHunter said:

the armory but if false it will call to the default file

I'm sorry you're right, but anyway why run the half the boltcutterarmory script to then call the regular boltcutter when you can have a simple check in useItem? And as I said my solution works for us due to Fed Reserve on Police and Armory on Opfor.

Share this post


Link to post
Share on other sites

Does the box need to have the same code as in the original vault for Federal? It has 2 parts to open the vault and to fix it. Or is this not needed as you use the normal inventory instead of the Virtual Inventory?

Share this post


Link to post
Share on other sites
On 11/24/2017 at 4:36 AM, Mr Vatallus said:

@[IL] KingCrazyHunter everytime someone trys to rob the fed armory, they get "The armory has recently been raided and is on lockdown!" and that is after a server restart. is there any fix to this?

add this to your life_server init.sqf

fed_armory setVariable ["robbed",false,true];

 

Share this post


Link to post
Share on other sites
6 minutes ago, FinexHD said:

I am using this script on 4.0, everything works but for somereason when the charge explodes and I go in the inventory I can not take out any items?

Don't use 4.0. 

Share this post


Link to post
Share on other sites

Im using Altis Life 5.0 and its not working for me

 

RPT LOG ERROR

if (cursorObject == fed_armory) theヘ
  Error position: <ursorObject == fed_armory) theヘ
  Error Missing )
File core\pmenu\fn_useItem.sqf [life_fnc_useItem], line 92
Error in expression <tem isEqualTo "blastingcharge"): {
if (cursorObject == fed_armory) theヘ
  Error position: <ursorObject == fed_armory) theヘ
  Error Missing )
File core\pmenu\fn_useItem.sqf [life_fnc_useItem], line 92

and i past as the tutorial said

 

On 10/29/2017 at 3:28 PM, [IL] KingCrazyHunter said:

case (_item isEqualTo "blastingcharge"😞 { if (cursorObject == fed_armory) then { player reveal fed_armory; (group player) reveal fed_armory; [cursorObject] spawn life_fnc_blastingChargeArmory; closeDialog 0; } else { player reveal fed_bank; (group player) reveal fed_bank; [cursorObject] spawn life_fnc_blastingCharge; closeDialog 0; }; };

 

Share this post


Link to post
Share on other sites

For those that want it, here's the life server function to spawn weapons without the modded CUP weapons as it's not gonna work if you're trynna load modded weapons.

Obviously you have to add more stuff after it otherwise it'll be a very boring robbery, but itll save it not working at all

Spoiler
/*
File: fn_blastingChargeArmory.sqf
Author: Tonic, Izzi & Jokahghost
 
Description:
Handles fed explosion and spawns loot when successful.
*/
private ["_bomb","_time"];
_marker = getMarkerPos "federal_armory"; //Creates a marker indicating that the robbery is still active
createMarker ["Markerarm", _marker];
"Markerarm" setMarkerColor "ColorRed";
"Markerarm" setMarkerText "!! Active Robbery !!";
"Markerarm" setMarkerType "Mil_dot";
createMarker ["Markerarmc", _marker];
"Markerarmc" setMarkerColor "ColorRed";
"Markerarmc" setMarkerShape "Ellipse";
"Markerarmc" setMarkerSize [600,600]; // the size of the KOS zone
_time = time + (20 * 60); //Set this as the same time you set in demoChargeTimerArmory.sqf
waitUntil{(round(_time - time) < 1)};
sleep 0.9;
if (!(fed_armory getVariable["chargeplaced",false])) exitWith {{deleteMarker "Markerarm";deleteMarker "Markerarmc";} forEach allPlayers;};
 
_bomb = "Bo_GBU12_LGB_MI10" createVehicle [getPosATL fed_armory select 0, getPosATL fed_armory select 1, (getPosATL fed_armory select 2)+0.5];
fed_armory setVariable ["chargeplaced",false,true];
fed_armory setVariable ["safe_open",true,true];
fed_armory setVariable ["locked",false,true];
fed_armory setVariable ["robbed",true,true];
 
clearWeaponCargoGlobal fed_armory;
clearMagazineCargoGlobal fed_armory;
clearItemCargoGlobal fed_armory;
clearBackpackCargoGlobal fed_armory;
 
sleep 0.3;
 
_var=floor(random 6);
if (_var==0) then {fed_armory addWeaponCargoGlobal ["arifle_AK12_F", 2];};
if (_var==1) then {fed_armory addWeaponCargoGlobal ["arifle_CTAR_ghex_F", 1];};
if (_var==2) then {fed_armory addWeaponCargoGlobal ["launch_B_Titan_F", 2];};
if (_var==3) then {fed_armory addWeaponCargoGlobal ["launch_RPG32_F", 15];};
if (_var==4) then {fed_armory addWeaponCargoGlobal ["LMG_Zafir_F", 2];};
if (_var==5) then {fed_armory addWeaponCargoGlobal ["MMG_02_black_F", 10];};
sleep 300; //Waits 5 minutes after the bomb has exploded assuming the robbers have already gotten what they came for
 
{
    deleteMarker "Markerarm";
    deleteMarker "Markerarmc";
} forEach allPlayers;
 
sleep 600; //waits another 10 minutes before everything in the vault gets cleared
clearWeaponCargoGlobal fed_armory;
clearMagazineCargoGlobal fed_armory;
clearItemCargoGlobal fed_armory;
clearBackpackCargoGlobal fed_armory;
 
fed_armory setVariable ["chargeplaced",false,true];
fed_armory setVariable ["safe_open",false,true];
fed_armory setVariable ["locked",true,true];
 
_marker = getMarkerPos "federal_armory"; //This is used to indicate that the armory has recently been robbed and can't be robbed again for some time
createMarker ["Markerarms", _marker];
"Markerarms" setMarkerColor "ColorOrange";
"Markerarms" setMarkerText "Elevated Security";
"Markerarms" setMarkerType "Mil_dot";
createMarker ["Markerarmsc", _marker];
"Markerarmsc" setMarkerColor "ColorOrange";
"Markerarmsc" setMarkerShape "Ellipse";
"Markerarmsc" setMarkerSize [600,600];
 
sleep 3600; //waits an hour before it can be robbed again
{
    deleteMarker "Markerarms";
    deleteMarker "Markerarmsc";
} forEach allPlayers;
fed_armory setVariable ["robbed",false,true];

 

Edited by Brodie

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...