Jump to content

HomeUser

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About HomeUser

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have a script that starts a bank robbery /* File: fn_bankdrill.sqf Creator . HomeUser Description: Starts the bank process. */ _unit = [_this,0,Objnull,[Objnull]] call BIS_fnc_param; if (isNull _unit) exitWith {}; if (life_bank_drilling) exitWith {}; life_bank_drilling = true; publicVariable "life_bank_drilling"; createMarker ["bankMarker", position life_bank_building]; "bankMarker" setMarkerShape "ICON"; "bankMarker" setMarkerType "mil_dot"; "bankMarker" setMarkerColor "ColorRed"; "bankMarker" setMarkerText "Robbery in Progress"; hint "You have begun drilling the vault door! Drilling will complete in 10 minutes and will fail if you are killed or restrained within that time."; _success = false; _elapsed = 0; while {life_bank_drilling} do { sleep 1; _elapsed = _elapsed + 1; if (!alive _unit || _unit getVariable ["restrained",false] || _unit distance (getPos life_bank_building) > 60) exitWith {_success = false}; if (_elapsed >= 10) exitWith {_success = true}; }; if (_success) then { [[[0,1,2],"The vault door has finished drilling and is now open FOR FIVE MINUTES."],"life_fnc_broadcast",_unit,false] spawn life_fnc_MP; sleep (5*60); life_bank_building setVariable ["bis_disabled_Door_4", 1, true]; life_bank_building animate ["door_4_rot", 0]; life_bank_drilling = false; [[[0,1,2],"The Bank of Altis is no longer being robbed."],"life_fnc_broadcast",west,false] spawn life_fnc_MP; "bankMarker" setMarkerText "Elevated Security"; sleep 60; deleteMarker "bankMarker"; }; if (!_success) then { "bankMarker" setMarkerText "Elevated Security"; [[[0,1,2],"The Bank of Altis is no longer being robbed."],"life_fnc_broadcast",west,false] spawn life_fnc_MP; life_bank_drilling = false; sleep 60; deleteMarker "bankMarker"; }; When i run the script through an add action this addAction ["Begin Drilling Vault", life_fnc_bankDrill,false,4,true,true,"",' player distance (getMarkerPos "life_bank_door") < 5 && life_inv_drill > 0 && !life_bank_drilling']; I get to the part where its _elapsed = _elapsed +1 and it doesn't trigger the if (_elapsed >= 10) exitWith {_success = true};
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.