diff --git a/DMS_init.sqf b/DMS_init.sqf index ee1efda..c6f2713 100644 --- a/DMS_init.sqf +++ b/DMS_init.sqf @@ -5,26 +5,33 @@ if(isServer) then { // compilation list - DMS_findSafePos = compileFinal preprocessFileLineNumbers "scripts\DMS_findSafePos.sqf"; - DMS_createBox = compileFinal preprocessFileLineNumbers "crates\DMS_CreateBox.sqf"; - DMS_CreateMarker = compileFinal preprocessFileLineNumbers "scripts\DMS_CreateMarker.sqf"; - DMS_spawnAI = compileFinal preprocessFileLineNumbers "scripts\DMS_spawnAI.sqf"; - DMS_selectMission = compileFinal preprocessFileLineNumbers "scripts\DMS_selectMission.sqf"; - DMS_CleanUp = compileFinal preprocessFileLineNumbers "scripts\DMS_CleanUp.sqf"; - DMS_Config = compileFinal preprocessFileLineNumbers "scripts\DMS_Config.__sqf2str"; + DMS_findSafePos = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_findSafePos.sqf"; + DMS_createBox = compile preprocessFileLineNumbers "\x\addons\DMS\crates\DMS_CreateBox.sqf"; + DMS_CreateMarker = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_CreateMarker.sqf"; + DMS_spawnAI = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_spawnAI.sqf"; + DMS_selectMission = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_selectMission.sqf"; + DMS_CleanUp = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_CleanUp.sqf"; + DMS_Config = compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_Config.sqf"; // not fully loaded yet - DMS_Loaded = false; + /* + DMS_Loaded = false; call DMS_Config; waitUntil {DMS_Loaded}; + + + */ + // LOADS THIS FAR BUT DOESNT LAUNCH SELECT MISSION - CURRENT PROBLEM call DMS_selectMission; + //[] call compile preprocessFileLineNumbers "\x\addons\DMS\scripts\DMS_selectMission.sqf"; + diag_log "DMS :: Functions loaded - starting the rest of the script."; diff --git a/missions/MM10.sqf b/missions/MM10.sqf index d7f2ef0..91e76f9 100644 --- a/missions/MM10.sqf +++ b/missions/MM10.sqf @@ -37,9 +37,10 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; diff --git a/missions/MM2.sqf b/missions/MM2.sqf index a56f0e5..5c99653 100644 --- a/missions/MM2.sqf +++ b/missions/MM2.sqf @@ -36,10 +36,11 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/missions/MM3.sqf b/missions/MM3.sqf index 02bd980..c7e5819 100644 --- a/missions/MM3.sqf +++ b/missions/MM3.sqf @@ -36,9 +36,10 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; diff --git a/missions/MM4.sqf b/missions/MM4.sqf index a0b6551..3c8c7af 100644 --- a/missions/MM4.sqf +++ b/missions/MM4.sqf @@ -37,10 +37,11 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/missions/MM5.sqf b/missions/MM5.sqf index 407104a..1136a08 100644 --- a/missions/MM5.sqf +++ b/missions/MM5.sqf @@ -38,10 +38,11 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/missions/MM6.sqf b/missions/MM6.sqf index c77f03f..1901d64 100644 --- a/missions/MM6.sqf +++ b/missions/MM6.sqf @@ -37,9 +37,10 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; diff --git a/missions/MM7.sqf b/missions/MM7.sqf index bf21690..542aec9 100644 --- a/missions/MM7.sqf +++ b/missions/MM7.sqf @@ -37,10 +37,11 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/missions/MM8.sqf b/missions/MM8.sqf index d35ca3d..294d048 100644 --- a/missions/MM8.sqf +++ b/missions/MM8.sqf @@ -38,9 +38,10 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/missions/MM9.sqf b/missions/MM9.sqf index 6ff8896..5c4eb69 100644 --- a/missions/MM9.sqf +++ b/missions/MM9.sqf @@ -36,10 +36,11 @@ waitUntil{{isPlayer _x && _x distance _pos < 30 } count playableUnits > 0}; ["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; // Run Cleanup -["Ended","Clean"] call DMS_CleanUp; +[] call DMS_CleanUp; - + deleteMarker "DMS_MainMarker"; + deleteMarker "DMS_MainDot"; sleep 150; diff --git a/scripts/DMS_cleanup.sqf b/scripts/DMS_cleanup.sqf index 6a46a77..70778a2 100644 --- a/scripts/DMS_cleanup.sqf +++ b/scripts/DMS_cleanup.sqf @@ -1,31 +1,20 @@ fnc_DMS_cleanUp = { - private ["_marker","_boxes"]; - _marker = _this select 0; - _objects = _this select 1; - - if (_marker == "Ended") then { - deleteMarker "DMS_MainMarker"; - deleteMarker "DMS_MainDot"; - }; - - if (_objects = "Clean") then { - _this enableSimulation false; - _this removeAllMPEventHandlers "mpkilled"; - _this removeAllMPEventHandlers "mphit"; - _this removeAllMPEventHandlers "mprespawn"; - _this removeAllEventHandlers "FiredNear"; - _this removeAllEventHandlers "HandleDamage"; - _this removeAllEventHandlers "Killed"; - _this removeAllEventHandlers "Fired"; - _this removeAllEventHandlers "GetOut"; - _this removeAllEventHandlers "GetIn"; - _this removeAllEventHandlers "Local"; - clearVehicleInit _this; - deleteVehicle _this; - deleteGroup (group _this); - _this = nil; - - }; + _this enableSimulation false; + _this removeAllMPEventHandlers "mpkilled"; + _this removeAllMPEventHandlers "mphit"; + _this removeAllMPEventHandlers "mprespawn"; + _this removeAllEventHandlers "FiredNear"; + _this removeAllEventHandlers "HandleDamage"; + _this removeAllEventHandlers "Killed"; + _this removeAllEventHandlers "Fired"; + _this removeAllEventHandlers "GetOut"; + _this removeAllEventHandlers "GetIn"; + _this removeAllEventHandlers "Local"; + clearVehicleInit _this; + deleteVehicle _this; + deleteGroup (group _this); + _this = nil; + diag_log format ["DMS :: Markers, vehicles, AI and loot boxes and other items have been cleaned up!"]; }; diff --git a/scripts/DMS_selectMission.sqf b/scripts/DMS_selectMission.sqf index bd5d2cc..138dc50 100644 --- a/scripts/DMS_selectMission.sqf +++ b/scripts/DMS_selectMission.sqf @@ -19,7 +19,7 @@ DMS_SelectMission = { _missVar = _MainArray select _slct; // Help from secret skype group. - call compile preprocessfilelinenumbers format["missions\%1.sqf",_missVar]; + call compile preprocessfilelinenumbers format["\x\addons\DMS\missions\%1.sqf",_missVar]; //DMS_MissionRunning = 1; };