Helicrash Ammunition

You can't change it specifically for helicrashes easilly but you can for all loot. Look at the clientside file spawn_loot.sqf and bring it into your mission file

Code:
        case "weapon": {
                //Item is a weapon, add it and a random quantity of magazines
                _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
                _item addWeaponCargoGlobal [_iItem,1];
                _mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
                if (count _mags > 0) then {
                        _item addMagazineCargoGlobal [(_mags select 0),(round(random 3)+1)];
                };

(round(random 3)+1) is the number of mags, 1 + a random number up to 3 is the default.
 
Working. How do i realize that all the SCAR weapons will spawn with ammunition too? There must be a variable where it call for the magazines am i right?
 
Working. How do i realize that all the SCAR weapons will spawn with ammunition too? There must be a variable where it call for the magazines am i right?

what do you mean by this? I have some SCAR variants on my server and they already spawn with ammo. Have you disabled ammo for all guns and still want to have ammo for the mk17 or something?
 
My SCAR weapons spawn with 0 or only 1 clips atm. The other weapons with
(round(random 1)+3)

Seems like this isn't working for the SCAR weapons
 
My SCAR weapons spawn with 0 or only 1 clips atm. The other weapons with
(round(random 1)+3)

Seems like this isn't working for the SCAR weapons

That's strange how many did you check? The mags spawn with the code I listed, same as every gun (1 + random number up to 3). I've never found an mk17 on my server without mags.
 
I've checked every spawned crashsite

case "weapon": {
//Item is a weapon, add it and a random quantity of magazines
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_item addWeaponCargoGlobal [_iItem,1];
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
if ((count _mags) > 0) then {
if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
_item addMagazineCargoGlobal [(_mags select 0), (round(random 1)+2)];
};
};
 
As i said it's like there is no variable for the ammunition. But yet i dunno where.

Like this:
"Ok let me spawn this Mk17 and add the magazines....hmm i can't find the ammunition for this type of gun...better spawn no magazines"
 
Back
Top