Browse Source

Fix deploy script

m3ales 4 years ago
parent
commit
275d3616b7
1 changed files with 11 additions and 3 deletions
  1. 11 3
      addons - Copy/RD501_Main/functions/medical_ccp/fnc_deployCcp.sqf

+ 11 - 3
addons - Copy/RD501_Main/functions/medical_ccp/fnc_deployCcp.sqf

@@ -1,6 +1,14 @@
 params ["_target", "_player", "_params"];
 //_target is the box in an ace interact
-if(vehicle _target != _target) exitWith { };
 _position = position _target;
-_spawner = rd501_medical_ccp_building createVehicle _position;
-deleteVehicle _target;
+deleteVehicle _target;
+
+[
+	{
+		params["_position"];
+		systemChat format["Creating CCP at %1", _position];
+		_spawner = rd501_medical_ccp_building createVehicle _position;
+	},
+	[_position],
+	0.1
+] call CBA_fnc_waitAndExecute;