[12775.161, 9667.4893, 0] cords i want mission to spawn how would i add this to
private ["_position","_box","_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_cleanunits","_rndnum"];
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
diag_log format["WAI: Mission Weapon Cache Started At %1",_position];
_box = createVehicle ["USVehicleBox",[(_position select 0),(_position select 1),0], [], 0, "CAN_COLLIDE"];
[_box] call spawn_ammo_box;
_rndnum = round (random 3) + 4;
[[_position select 0, _position select 1, 0], //position
_rndnum, //Number Of units
1, //Skill level 0-1. Has no effect if using custom skills
"Random", //Primary gun set number. "Random" for random weapon set.
4, //Number of magazines
"", //Backpack "" for random or classname here.
"", //Skin "" for random or classname here.
"Random", //Gearset number. "Random" for random gear set.
true
] call spawn_group;
[[_position select 0, _position select 1, 0], //position
4, //Number Of units
1, //Skill level 0-1. Has no effect if using custom skills
"Random", //Primary gun set number. "Random" for random weapon set.
4, //Number of magazines
"", //Backpack "" for random or classname here.
"", //Skin "" for random or classname here.
"Random", //Gearset number. "Random" for random gear set.
true
] call spawn_group;
[[[(_position select 0), (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1), 0]], //position(s) (can be multiple).
"M2StaticMG", //Classname of turret
0.5, //Skill level 0-1. Has no effect if using custom skills
"", //Skin "" for random or classname here.
0, //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
2, //Number of magazines. (not needed if ai_static_useweapon = False)
"", //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
"Random", //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
true
] call spawn_static;
[_position,"ION Inc."] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";
[nil,nil,rTitleText,"Free Weapons donated by ION Inc.! Greed will get you killed!", "PLAIN",10] call RE;
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
sleep 5;
_currenttime = floor(time);
{if((isPlayer _x) AND (_x distance _position <= 150)) then {_playerPresent = true};}forEach playableUnits;
if (_currenttime - _starttime >= wai_mission_timeout) then {_cleanmission = true;};
if ((_playerPresent) OR (_cleanmission)) then {_missiontimeout = false;};
};
if (_playerPresent) then {
waitUntil
{
sleep 5;
_playerPresent = false;
{if((isPlayer _x) AND (_x distance _position <= 30)) then {_playerPresent = true};}forEach playableUnits;
(_playerPresent)
};
diag_log format["WAI: Mission Weapon cache Ended At %1",_position];
[nil,nil,rTitleText,"No need to Thank ION Inc.", "PLAIN",10] call RE;
} else {
clean_running_mission = True;
deleteVehicle _box;
{_cleanunits = _x getVariable "missionclean";
if (!isNil "_cleanunits") then {
switch (_cleanunits) do {
case "ground" : {ai_ground_units = (ai_ground_units -1);};
case "air" : {ai_air_units = (ai_air_units -1);};
case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
case "static" : {ai_emplacement_units = (ai_emplacement_units -1);};
};
deleteVehicle _x;
sleep 0.05;
};
} forEach allUnits;
diag_log format["WAI: Mission Wepaon cache timed out At %1",_position];
[nil,nil,rTitleText,"ION Inc. took the weapons to Trader City Balota to sell!", "PLAIN",10] call RE;
};
missionrunning = false;