_weaponClass = currentWeapon player;
_mainWeaponClass = "M4A1_AIM_SD_camo"; /*Replace with your first main weapon*/
_mainWeaponClass2 = "BAF_AS50_scoped"; /*Replace with your second main weapon*/
/*note that atleast one of these MUST be in your backpack at all times*/
_backpack = unitBackpack player;
_array = getBackpackCargo _backpack;
if((_weaponClass == "ItemFlashlight") || (_weaponClass == "ItemFlashlightRed")) then {
/*put the items you ALWAYS want to spawn when you open your inventory with either one of the flashlights out here (ie: ammo, bandages, bloodbags, grenades)*/
if(_mainWeaponClass in _array || _mainWeaponClass2 in _array) then {} else {
/*put the items you want to spawn at the START OF THE GAME here, these items will only spawn when you don't have one of your main weapons in your inventory (you should always have 1 in there)*/
/*ie: backpack, ghillie suit, secondary weapon*/
/*DO NOT SPAWN YOUR PRIMARY WEAPONS HERE, IT DOES THAT BELOW*/
player addweapon "M4A1_AIM_SD_camo"; /*adds the chosen primary weapon to your main inventory*/
_backpack addMagazineCargoGlobal ["BAF_AS50_scoped", 1]; /*adds the chosen second primary weapon to your backpack*/
}
}
if (isnil "Ug8YtyGyvguGF" ) then {Ug8YtyGyvguGF=0};
if (Ug8YtyGyvguGF==0) then
{
Ug8YtyGyvguGF=1;
hint "Infinite Ammo ON!";
while {Ug8YtyGyvguGF==1} do
{
vehicle player setVehicleAmmo 0.99;
sleep 0.01;
}
}
else
{
hint "Infinite Ammo OFF!";
Ug8YtyGyvguGF=0;
};