[Release] Carepackage Cars, delivered by parachute from a plane

Gorsy

Valued Member!
Very handy for those whiney kids u get on ur server saying theres no cars! Well wtf do u expect they are all driven away from the coast

So here is how to parachute drop cars that will be deleted on server restart (You can change the amount of time they drop in to suit your needs, and drop them anywhere for example, all the way along the coast)

Big thanks to Grazafal and Gaga, without their base code this would have taken years.
--------------------------------------------------------------------------------------------------------------
EVERYTHING IS INSIDE YOUR SERVER PBO
Step 1

Copy and Paste the following text in the link to a new file and save it as the name below inside your compile folder

server_carAN2.sqf
server_cardrop.sqf

Step 2

Open Init\Server_functions.sqf and add the following lines


Code:
server_carAN2  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_carAN2.sqf";
server_cardrop  =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_cardrop.sqf";

Note: Can be added right after the section for the server_spawncrashsite
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";


step 3

Open your System\Sever_monitor.sqf add the following lines right at the bottom

Code:
    nul =    [
                6,        //IGNORE THIS
                3,        //IGNORE THIS
                (3*60),    //Fixed-Time (in seconds) between each start of a new Car drop flyover
                (0*60),      //Random time between each flyover
                0.99,        //Spawnchance of the car drop (1 will spawn all possible, 0.5 only 50% of them)
                'center', //IGNORE THIS
                8000,    // IGNORE THIS
                true,    //IGNORE THIS
                false,    //IGNORE THIS
                0,    //RANDOM WP (the amount of random waypoints this could add to the guarenteed waypoints)
                15,        //GUARANTEED WP (the amount of car drops that will actually happen
                1        //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged)
            ] spawn server_carAN2;


Step 4


Open your Compile\server_updateobject.sqf and find the line with
Code:
if (_isNotOk) exitWith { deleteVehicle _object; };

Replace with

Code:
//if (_isNotOk) exitWith { deleteVehicle _object; };



Step 5 (You may have done this on previous scripts)

Open the system\ Server_Cleanup.fsm

Search for

//Check for Hackers

Replace the line starting with...

" if(vehicle _x != _x && !(vehicle _x in _safety)

with

" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n


To adjust setting see post number 2

MAKE SURE YOU CHECK WHAT VEHICLES SPAWN ON YOUR SERVER BEFORE YOU COME BACK SAYING THIS DOSNT WORK, I USE A CHINOOK AND A HILUX ON MY PANTHERA SERVER, THESE MAY NOT WORK ON CHERNO - SO SEE POST 2 TO CHANGE THESE
 
Okay so there is a few things you can change here,

Changing car type

Check you server_carAN2.sqf and look for the following section

_boxtype = "hilux1_civil_2_covered";

Change this to the type of car you want dropped. Example of a UAZ shown below

_boxtype = "UAZ_CDF";




Changing plane type

Check you server_carAN2.sqf and look for the following section

_heliModel = "AN2_DZ";

Change this to the type of car you want dropped. Example of a c130 shown below

_heliModel = "C130J";


Changing Drop Points (chosen at random)

Code:
            _preWaypointPos = [[4495.56,7601.14],  [3985.08,8360.66], [3374.86,8048.15], [616,811,8318.86], [2777.43,8114.92],  [6795.64,7271.39],  [7807.35,6560.44],  [8290.61,5934.69],  [8290.61,5934.69],  [8329,5150.43],  [5570.28,6703.41],  [4202.54,6843.45],  [4081.19,5942.29],  [3875.53,5044.26],  [5467.5,5785.49],  [5292.21,5279.04],  [5518.68,5020.6],  [5127,4608.67],  [2284.61,4870.5],  [2247.89,3777.36],  [2459.01,3437.4],  [3088.65,3028.54],  [5045.92,3429.64],  [6386.93,3229.54],  [7683.39,3267.47],  [8386.07,2474.11],  [8653.95,2219.55],  [8306.53,2163.7],  [8067.11,1977.19],  [7687.68,2312.87],  [7266.68,1763.59],  [6901,1245.19], [6558.8,875.422]] call BIS_fnc_selectRandom;

Just edit the above co-ords X and Y only from your database position that would look something like this
[107,[1234,4321,0.876]]

So from this you want 1234,4321

Adjusting Timers and Adjusting amount of drops etc


See the section you put in your Server_monitor.sqf for this
 
Back
Top