Jump to content
  • 0

Vehicle ammo in crate (SEM)


Kensai

Question

Hello to everybody.

I'm using RHS, SEM and A3EAI mods. A3EAI is using Russian stuff, SEM is using USA stuff. I want to add armed vehicles to server, like HMMWV  with M2 gun. Want to add 1 more convoy mission in to SEM 0.8.3 from KiloSwiss, with crate that can fill vehicles ammo, same like in Editor box_NATO_ammoveh_f. I spent 1 week for testing, learning and serching in google, but actually i'm not native english speaker, and my scripting skill is 0, it's very hard for me. That's my last stand to ask from here. I serached in topics, didn't found something same.

I like SEM from KiloSwiss, becouse it's not load server too much and working good, thanks a lot to KiloSwiss, he did very good work.

Here is his code of mission for eg. (i just changed vehicles, deleted calling script that clearing ammo from vehicles and changed [_box1] call SEM_fnc_crateLoot; to [_box1] call SEM_fnc_crateLootUSA; ) (name of mission and description translated in to russian)

	/* KiloSwiss */
private["_startPos","_endPos","_timeout","_name","_missionID","_missionType","_dir","_missionObjects","_convoyVehicles","_group","_box1","_hintString","_convoy","_start","_units","_endCondition","_enterableVehicles"];

_startPos = _this select 0 select 0;
_endPos = _this select 0 select 1;
_name = _this select 1 select 1;
_timeOut = _this select 1 select 2; //Mission timeout
_missionID = _this select 2;
_missionType = _this select 3;
_dir = (_this select 0) call BIS_fnc_dirTo;
_missionObjects = [];
_convoyVehicles = [];
_enterableVehicles = [];
//--

_convoyVeh1 =	["rhsusf_m1025_d_s_m2",_startPos,1,0,_dir] call SEM_fnc_spawnVehicle;
_mainVehicle =	["rhsusf_M1078A1P2_B_M2_d_flatbed_fmtv_usarmy",_startPos,1,0,_dir] call SEM_fnc_spawnVehicle;
_convoyVeh2 =	["rhsusf_rg33_m2_d",_startPos,1,0,_dir] call SEM_fnc_spawnVehicle;
{_convoyVehicles pushBack _x}forEach [_convoyVeh1, _mainVehicle, _convoyVeh2];

//_enterableVehicles pushBack _mainVehicle;

//--
_box1 = createVehicle ["Box_NATO_Wps_F", _startPos, [], 30, "NO_COLLIDE"];
_missionObjects pushBack _box1;
_box1 call SEM_fnc_emptyGear;
_box1 setDir (getDir _mainVehicle);
[_box1, _mainVehicle] call SEM_fnc_attachtoVeh;

//--
_group = [_startPos,(12+(random 2))] call SEM_fnc_spawnAI;
{_missionObjects pushBack _x}forEach units _group;

_convoy = [_group, _endPos, _missionID, _mainVehicle, _convoyVehicles, _enterableVehicles] spawn SEM_fnc_AIconvoy;

_hintString = format["<t align='center' size='2.0' color='#f29420'>Задание<br/>%1</t><br/>
<t size='1.25' color='#ffff00'>______________<br/><br/>Нам доложили что армия США превозят груз с вооружением. Остановите его!", _name];
SEM_globalHint = [0,_hintString]; publicVariable "SEM_globalHint";


	/* Mission End Conditions */
waitUntil{sleep 1; scriptDone _convoy};
_start = time;
_units = units _group;
waitUntil{	sleep 5;
	_endCondition = [(getPos _mainVehicle),_units,_start,_timeout,_missionID,[_mainVehicle,_box1]]call SEM_fnc_endCondition;
	(_endCondition > 0)
};

SEM_globalMissionMarker = [false,_endCondition,_missionID,_missionType];
publicVariable "SEM_globalMissionMarker";	/* Let clients delete the Marker */
/*localhost*/if(!isDedicated)then{SEM_globalMissionMarker call SEM_client_createMissionMarker};

if(_endCondition == 3)then[{ //Win!
	[_box1] call SEM_fnc_crateLootUSA;
	_box1 call SEM_fnc_safeDetach;
	{_x call SEM_fnc_vehicleUnlock}count _enterableVehicles;
	//{if !(_x in _enterableVehicles)then{_x spawn{_this setDamage 1; sleep 300; deleteVehicle _this}}; true}forEach _convoyVehicles);
	//if(SEM_MissionCleanup > 0)then{[(getPos _mainVehicle), (_missionObjects - [_enterableVehicles])] call SEM_fnc_missionCleanup};
	_hintString = "<t align='center' size='2.0' color='#6bab3a'>Задание ВЫПОЛНЕНО<br/>
	<t size='1.25' color='#ffff00'>______________<br/><br/>Все цели были уничтожены!";
	SEM_globalHint = [_endCondition,_hintString]; publicVariable "SEM_globalHint";
},{	// 1 or 2 = Fail
	{deleteVehicle _x; sleep .1}forEach _missionObjects;
	_convoyVehicles spawn{{_x setDamage 1} count _this; sleep 300; {deleteVehicle _x}count _this};
	_hintString = "<t align='center' size='2.0' color='#ab2121'>Задание ПРОВАЛЕНО</t>";
	SEM_globalHint = [_endCondition,_hintString]; publicVariable "SEM_globalHint";
}];

deleteGroup _group;

And i copied and renamed fn_cratelootUSA and added class name to config.cpp, I changed all stuff to USA. it's working well. Changed {_loadout = ceil(random 4) to {_loadout = ceil(random 7), for random all cases.

/*
	[_box] call fn_crateLoadout;	== Random loadout is selected

	[_box, 3] call fn_crateLoadout;	== Loadout 3 is selected
	
	Original loadouts by drsubo
	Edited into a function by KiloSwiss
	
	ToDo for v0.3
	Create different loadouts/loot for each Crate (see comments)
*/
private ["_crate","_loadout","_ran","_rifles","_riflesGL","_LMGs","_rifleOptics","_SMGs","_smgOptics","_DMRs","_Sniper","_sniperOptics","_muzzles"];
_crate = _this select 0;
if(count _this > 1)then[{_loadout = _this select 1},{_loadout = ceil(random 7)}];

_crate call SEM_fnc_emptyGear;

_rifles = [
	["rhs_weap_mk18",						"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_mk18_grip2",					"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_mk18_grip2_KAC",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"],
	["rhs_weap_mk18_KAC",					"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m16a4",						"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m16a4_grip",					"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m16a4_carryhandle",			"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m16a4_carryhandle_grip",		"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m16a4_carryhandle_grip_pmag","rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"],
	["rhs_weap_m16a4_carryhandle_pmag",		"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"]
];

_riflesGL = [
	["rhs_weap_mk18_m320",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m16a4_carryhandle_M203",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m4a1_blockII_M203",		"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red"],
	["rhs_weap_m4a1_m203s",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m4a1_m203",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m4a1_m320",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m4a1_carryhandle_m203S",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"],
	["rhs_weap_m4a1_carryhandle_m203",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"],
	["rhs_weap_m4_m203S",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"],
	["rhs_weap_m4_m203",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Green"],
	["rhs_weap_m4_m320",				"rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Yellow"]
];

_LMGs = [
	["rhs_weap_m240B",				"rhsusf_100Rnd_762x51"],
	["rhs_weap_m240B",				"rhsusf_100Rnd_762x51_m993"],
	["rhs_weap_m240B",				"rhsusf_100Rnd_762x51_m80a1epr"],
	["rhs_weap_m249_pip",			"rhsusf_100Rnd_556x45_soft_pouch"],
	["rhs_weap_m249_pip",			"rhsusf_200Rnd_556x45_soft_pouch"],
	["rhs_weap_m249_pip",			"rhsusf_100Rnd_556x45_M200_soft_pouch"]
];

_rifleOptics = ["rhsusf_acc_ACOG_USMC","rhsusf_acc_ACOG2_USMC","rhsusf_acc_ACOG3_USMC","rhsusf_acc_ACOG","rhsusf_acc_ACOG2","rhsusf_acc_ACOG3","rhsusf_acc_ELCAN"]; //"optic_Hamr","optic_Arco"

_SMGs = [
	["rhs_weap_m4a1_carryhandle",		"rhs_mag_30Rnd_556x45_Mk318_Stanag"],
	["rhs_weap_m4a1_blockII",			"rhs_mag_30Rnd_556x45_Mk318_Stanag"],
	["rhs_weap_m4a1_blockII_grip2",		"rhs_mag_30Rnd_556x45_Mk318_Stanag"],
	["rhs_weap_m4a1_blockII_grip2_KAC",	"rhs_mag_30Rnd_556x45_Mk262_Stanag"],
	["rhs_weap_m4a1_blockII_KAC",		"rhs_mag_30Rnd_556x45_Mk262_Stanag"],
	["rhs_weap_m4a1",					"rhs_mag_30Rnd_556x45_Mk262_Stanag"],
	["rhs_weap_m4a1_grip2",				"rhs_mag_30Rnd_556x45_M855A1_Stanag"],
	["rhs_weap_m4a1_grip",				"rhs_mag_30Rnd_556x45_M855A1_Stanag"],
	["rhs_weap_m4a1_carryhandle_grip2",	"rhs_mag_30Rnd_556x45_M855A1_Stanag"],
	["rhs_weap_m4a1_carryhandle_grip",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer"],
	["rhs_weap_m4a1_carryhandle_pmag",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer"],
	["rhs_weap_m4",						"rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer"],
	["rhs_weap_m4_grip2",				"rhs_mag_30Rnd_556x45_Mk318_Stanag"],
	["rhs_weap_m4_grip",				"rhs_mag_30Rnd_556x45_Mk262_Stanag"],
	["rhs_weap_m4_carryhandle",			"rhs_mag_30Rnd_556x45_M855A1_Stanag"],
	["rhs_weap_m4_carryhandle_pmag",	"rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer"]
];

_smgOptics = ["rhsusf_acc_eotech_552","rhsusf_acc_compm4"];


_DMRs = [
	["rhs_weap_sr25",			"rhsusf_20Rnd_762x51_m993_Mag"],
	["rhs_weap_sr25_ec",		"rhsusf_20Rnd_762x51_m118_special_Mag"],
	["rhs_weap_m14ebrri",		"rhsusf_20Rnd_762x51_m118_special_Mag"]
];

_Sniper = [
	["rhs_weap_XM2010",		"rhsusf_5Rnd_300winmag_xm2010"],
	["rhs_weap_XM2010_wd",	"rhsusf_5Rnd_300winmag_xm2010"],
	["rhs_weap_XM2010_d",	"rhsusf_5Rnd_300winmag_xm2010"],
	["rhs_weap_XM2010_sa",	"rhsusf_5Rnd_300winmag_xm2010"]
];

_sniperOptics = ["rhsusf_acc_LEUPOLDMK4","rhsusf_acc_LEUPOLDMK4_2"];

_muzzles = ["rhsusf_acc_rotex5_tan","rhsusf_acc_rotex5_grey","rhsusf_acc_SFMB556","rhsusf_acc_SF3P556"];

// Building loot from http://epochmod.com/forum/index.php?/topic/30788-list-of-a3-epoch-loot-classnames/


switch(_loadout)do{
	
	case 1:{	//random crap
		_opt = _rifleOptics select (random (count _rifleOptics -1));
		_crate additemcargoGlobal [_opt, 2];
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_mzl = _muzzles select (random (count _muzzles -1));
		_crate additemcargoGlobal [_mzl, 2];
		_crate additemcargoGlobal ["rhsusf_acc_harris_bipod", 2];
		_crate additemcargoGlobal ["rhsusf_acc_anpeq15", 2];
		_crate additemcargoGlobal ["rhsusf_assault_eagleaiii_ucp", 2];
		_crate additemcargoGlobal ["rhs_mag_m67", 5];
		_crate additemcargoGlobal ["rhsusf_ANPVS_14", 1];
		_crate additemcargoGlobal ["rhsusf_ANPVS_15", 1];
		_crate additemcargoGlobal ["Heal_EPOCH", 1];
		_crate additemcargoGlobal ["Repair_EPOCH", 2];
		_crate additemcargoGlobal ["Binocular", 2];
	};
			
	case 2:{	//random crap 2
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_opt = _rifleOptics select (random (count _rifleOptics -1));
		_crate additemcargoGlobal [_opt, 2];
		_crate addWeaponCargoGlobal ["MultiGun", 1];
		_crate addMagazineCargoGlobal ["EnergyPack", 5];
		_mzl = _muzzles select (random (count _muzzles -1));
		_crate additemcargoGlobal [_mzl, 2];
		_wpn = _SMGs select (random (count _SMGs -1));
		_opt = _smgOptics select (random (count _smgOptics -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate additemcargoGlobal [_opt, 1];
		_crate additemcargoGlobal ["rhsusf_acc_harris_bipod", 2];
		_crate additemcargoGlobal ["rhsusf_acc_anpeq15", 2];
		_crate additemcargoGlobal ["Defib_EPOCH", 2];
		_crate additemcargoGlobal ["Heal_EPOCH", 1];
		_crate additemcargoGlobal ["Repair_EPOCH", 2];
		_crate additemcargoGlobal ["Binocular", 2];
		_crate additemcargoGlobal ["FAK", 4];
		_crate additemcargoGlobal ["FoodSnooter", 2];
		_crate additemcargoGlobal ["FoodWalkNSons", 3];
		_crate additemcargoGlobal ["scam_epoch", 2];
		_crate additemcargoGlobal ["sweetcorn_epoch", 4];
		_crate additemcargoGlobal ["ItemTroutCooked", 1];
		_crate additemcargoGlobal ["ItemSeaBassCooked", 2];		
		_crate additemcargoGlobal ["Towelette", 4];
		_crate additemcargoGlobal ["HeatPack", 2];
		_crate additemcargoGlobal ["ColdPack", 1];
		_crate additemcargoGlobal ["ItemKiloHemp", 3];
		_crate additemcargoGlobal ["ItemCoolerE", 1];
		_crate additemcargoGlobal ["CircuitParts", 3];
		_crate additemcargoGlobal ["PartPlankPack", 7];
		_crate additemcargoGlobal ["MortarBucket", 2];
		_crate additemcargoGlobal ["CinderBlocks", 3];
		_crate additemcargoGlobal ["VehicleRepair", 1];				
	};	

	case 3:{	//good loot + SMGs + rifle magazines
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_opt = _rifleOptics select (random (count _rifleOptics -1));
		_crate additemcargoGlobal [_opt, 2];
		_wpn = _SMGs select (random (count _SMGs -1));
		_opt = _smgOptics select (random (count _smgOptics -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate additemcargoGlobal [_opt, 2];
		_crate additemcargoGlobal ["rhs_mag_m67", 5];
		_crate additemcargoGlobal ["Binocular", 4];
		_crate additemcargoGlobal ["FAK", 5];
		_crate additemcargoGlobal ["ItemSilverBar", 3];
		_crate additemcargoGlobal ["Pelt_EPOCH", 2];
		_crate additemcargoGlobal ["ItemMixOil", 1];
		_crate additemcargoGlobal ["ItemGPS", 1];
		_crate addbackpackcargoGlobal ["smallbackpack_teal_epoch", 1];
		_crate additemcargoGlobal ["rhsusf_ANPVS_14", 1];
		_crate additemcargoGlobal ["rhsusf_ANPVS_15", 1];
	};
			
	case 4:{	//good loot + basic weapons + rifle magazines
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_opt = _rifleOptics select (random (count _rifleOptics -1));
		_crate additemcargoGlobal [_opt, 2];
		_crate additemcargoGlobal ["ItemGPS", 2];
		_crate additemcargoGlobal ["ItemGoldBar", 2];
		_crate additemcargoGlobal ["Rangefinder", 2];
		_crate additemcargoGlobal ["FAK", 3];
		_crate additemcargoGlobal ["Pelt_EPOCH", 2];
		//_crate additemcargoGlobal ["ChainSaw", 1];
		_crate additemcargoGlobal ["ItemMixOil", 2];
		_crate additemcargoGlobal ["jerrycan_epoch", 2];
		_crate additemcargoGlobal ["rhsusf_assault_eagleaiii_ocp", 2];
		_mzl = _muzzles select (random (count _muzzles -1));
		_crate additemcargoGlobal [_mzl, 2];
	};
			
	case 5:{	//good loot + higher tier weapons + usefull attachments
		_wpn = _SMGs select (random (count _SMGs -1));
		_opt = _smgOptics select (random (count _smgOptics -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate additemcargoGlobal [_opt, 2];
		_wpn = _DMRs select (random (count _DMRs -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_wpn = _rifles select (random (count _rifles -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate additemcargoGlobal ["rhsusf_acc_M2010S", 2];
		_crate additemcargoGlobal ["ItemGPS", 2];
		_crate additemcargoGlobal ["ItemGoldBar10oz", 2];
		_crate additemcargoGlobal ["Rangefinder", 1];
		_crate additemcargoGlobal ["VehicleRepair", 1];
		_crate additemcargoGlobal ["FAK", 6];
		_crate additemcargoGlobal ["sweetcorn_epoch", 2];
		_crate additemcargoGlobal ["ItemSodaRbull", 1];
		_crate additemcargoGlobal ["Pelt_EPOCH", 2];
		_crate additemcargoGlobal ["ItemKiloHemp", 5];
		_crate additemcargoGlobal ["Towelette", 4];
		_crate addbackpackcargoGlobal ["B_Carryall_cbr", 1];
		_crate additemcargoGlobal ["rhs_mag_m67", 5];
	};	
	
	case 6:{	//excellent + high tier weapons + good attachments
		_wpn = _LMGs select (random (count _LMGs -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 1];
		_crate addMagazineCargoGlobal [(_wpn select 1), 5];
		_wpn = _Sniper select (random (count _Sniper -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 2];
		_crate additemcargoGlobal ["rhsusf_acc_M2010S", 2];
		_crate addWeaponCargoGlobal ["MultiGun", 1];
		_crate additemcargoGlobal ["ItemGoldBar10oz", 1];
		_crate additemcargoGlobal ["ItemSilverBar", 2];
		_crate addMagazineCargoGlobal ["EnergyPack", 4];
		_crate additemcargoGlobal ["ItemGPS", 2];
		_crate additemcargoGlobal ["Rangefinder", 1];
		_crate additemcargoGlobal ["FAK", 9];
		_crate additemcargoGlobal ["Repair_EPOCH", 1];
		_crate additemcargoGlobal ["Defib_EPOCH", 1];
		_crate additemcargoGlobal ["Heal_EPOCH", 2];
		_crate additemcargoGlobal ["jerrycan_epoch", 2];
		_crate addbackpackcargoGlobal ["B_Carryall_cbr", 1];
		_mzl = _muzzles select (random (count _muzzles -1));
		_crate additemcargoGlobal [_mzl, 2];
		_crate additemcargoGlobal ["rhsusf_acc_harris_bipod", 2];
		_crate additemcargoGlobal ["rhsusf_acc_anpeq15", 2];
		_crate additemcargoGlobal ["rhs_weap_fim92", 1];
		_crate additemcargoGlobal ["rhs_fim92_mag", 1];
		_crate additemcargoGlobal ["rhs_weap_M136_hedp", 1];
	};

	case 7:{	//DMRs, AR and Chainsaw
		_wpn = _SMGs select (random (count _SMGs -1));
		_opt = _smgOptics select (random (count _smgOptics -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_crate additemcargoGlobal [_opt, 2];
		_wpn = _DMRs select (random (count _DMRs -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 1];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_wpn = _riflesGL select (random (count _riflesGL -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 2];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_wpn = _LMGs select (random (count _LMGs -1));
		_crate addWeaponCargoGlobal [(_wpn select 0), 1];
		_crate addMagazineCargoGlobal [(_wpn select 1), 2];
		_opt = _sniperOptics select (random (count _sniperOptics -1));
		_crate additemcargoGlobal [_opt, 2];
		_crate addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 2];
		_crate additemcargoGlobal ["ItemGPS", 2];
		_crate additemcargoGlobal ["Rangefinder", 2];
		_crate additemcargoGlobal ["FAK", 8];
		_crate additemcargoGlobal ["ChainSaw", 1];
		_crate additemcargoGlobal ["ItemMixOil", 2];
		_crate additemcargoGlobal ["jerrycan_epoch", 2];
		_crate additemcargoGlobal ["EnergyPackLg", 4];
		_crate additemcargoGlobal ["MortarBucket", 6];
		_crate addbackpackcargoGlobal ["B_Carryall_cbr", 1];
		_crate additemcargoGlobal ["rhs_mag_m67", 5];
		_crate additemcargoGlobal ["rhs_weap_fim92", 1];
		_crate additemcargoGlobal ["rhs_fim92_mag", 1];
		_crate additemcargoGlobal ["rhs_weap_M136_hedp", 1];
	};
};

But i'm stucked with adding crate with vehicles ammo.

It's easy for troops, but i realy don't know how to make it for vehicles.

How to make same box box_NATO_ammoveh_f with ability to refill vehicles ammo like in Editor.

I will appreciate if anybody can help me.

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Give a search for ComputerMancers cmSalvage script, he has it packages as a standalone script right now.

It has vehicle salvage with ammo salvage as well as the reload option for vehicle ammo.

As is you can only reload ammo in gunner's seats.

WOW. thanks a lot, you are awesome. Watched youtube about this script, very interesting. Will try to add RHS vehicles for using it.

Link to comment
Share on other sites

  • 0

Quite easy to do, I never got that far into my idea for that mod but I will have a fun one soon!

Good luck man and I did some custom work with that cmsalvage not too long ago look toward the end of the post is the full array list including all the vehicles in arma 3

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...