Init.sqs
...
...
?(local server):[["RHIB","PBX"]]execVM"mission\spawnship.sqf"
?(local server):[["AV8B","AH1W","Mi17","Su34"]]execVM"mission\spawnplane.sqf"
?(local server):[["Truck5tMG","T72","Ural","HMMWVTOW","Stryker_TOW","UAZ","BRDM2","Landrover","Bus_city","M1030","M1Abrams","M113","BMP2","ZSU"]]execVM"mission\spawntank.sqf"
...
...
spawntank.sqf
_types = _this select 0;
_i = 0;
_count = count _types;
while {true} do
{
cutText["Spawning a new tank", "PLAIN DOWN"];
_i = floor(random (_count - 0.01));
westgrpland = createGroup west;
_wp1 = westgrpland addWaypoint [getPos landmove, 0];
_wp2 = westgrpland addWaypoint [getPos landcycle, 0];
_wp3 = westgrpland addWaypoint [getPos landmove, 0];
[westgrpland, 1] setWaypointType "MOVE";
[westgrpland, 2] setWaypointType "MOVE";
[westgrpland, 3] setWaypointType "CYCLE";
tank1 = createVehicle [_types select _i, [0,0,0], ["spawnland1", "spawnland2", "spawnland3"], 0, "NONE"];
"SoldierWCrew" createUnit [[0,0,30], westgrpland,"this setBehaviour ""AWARE"";tankman1 = this;this removeWeapon ""NVGoggles"";this setDir 0;this MoveInDriver tank1", 0.6, "private"];
tank1 setDir 0;
publicVariable "tank1";
Sleep 2;
waitUntil {damage tank1 > 0.9};
[tank1, westgrpland] spawn {Sleep(10);{deleteVehicle _x} forEach crew (_this select 0);deleteVehicle (_this select 0);deleteGroup (_this select 1);};
Sleep(1);
};
1 tank in SP, 2 in MP with a dedicated server and a client.