vhcspawnlarge.sqf 1.17 KB
Newer Older
Justyn23's avatar
Justyn23 committed
1 2 3 4 5 6 7 8 9 10 11 12
// small car spawn
_startingloc = "location_start" call BIS_fnc_getParamValue;
_spawnloc = getpos carspawn_3;


Cooldown = 1;

_randomcar =  ["C_Offroad_01_F", "C_Van_01_transport_F", "CUP_C_Ural_Civ_03", "CUP_C_Datsun_Plain"] call BIS_fnc_selectRandom;


	if (_startingloc == 1) then
	{
13
	_spawnloc = getpos carspawn3_2;
Justyn23's avatar
Justyn23 committed
14 15 16
	};
	if (_startingloc == 2) then
	{
17
	_spawnloc = getpos carspawn3_1;
Justyn23's avatar
Justyn23 committed
18 19 20
	};
	if (_startingloc == 3) then
	{
21
	_spawnloc = getpos carspawn3_4;
Justyn23's avatar
Justyn23 committed
22 23 24
	};
	if (_startingloc == 4) then
	{
25
	_spawnloc = getpos carspawn3_1;
Justyn23's avatar
Justyn23 committed
26 27
	};

28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
private _veh = _randomcar createVehicle _spawnloc;

[
	_veh,
	"Impound Vehicle",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
	"(_this distance _target < 5) AND (_target isKindOf 'Car_F')",
	"(_caller distance _target < 5) AND (_target isKindOf 'Car_F')",
	{},
	{},
	{deleteVehicle _target;},
	{},
	[],
	10,
	-10,
	false,
	false
] remoteExec ["BIS_fnc_holdActionAdd", west];
Justyn23's avatar
Justyn23 committed
47 48 49 50 51

sleep 10; //cooldown
Cooldown = 0;
		
//Cooldown = 0; this addAction ["Spawn large car", "scripts\vhcspawnlarge.sqf",[],1,true,true,"","Cooldown < 1"]