I've been messing with a script to replace CAF Aggressors weapons and magazines with massi's weapons from his NATO and Spetznaz weapons addon. I initially used global commands just to be 110% sure, but removeAllWeapons is local, so I opted for local commands and server side execution.
After some testing on dedi it seems to work, the AI have the loadouts intended by the script and you can interact with them, though if the player is one of the units affected, the main weapon won't be replaced but magazines will be. Input appreciated.
The script (used as function otl7_fnc_replaceCAFaks):
Exec in init.sqf:
After some testing on dedi it seems to work, the AI have the loadouts intended by the script and you can interact with them, though if the player is one of the units affected, the main weapon won't be replaced but magazines will be. Input appreciated.
The script (used as function otl7_fnc_replaceCAFaks):
Code:
{switch (typeOf _x) do
 {
 case "CAF_AG_ME_T_AK47" :
   {
   removeAllWeapons _x;
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
         _x addWeapon "arifle_mas_akms";
   };
 case "CAF_AG_ME_T_AK74" :
   {
   removeAllWeapons _x;
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
         _x addWeapon "arifle_mas_akm";
   };
 case "CAF_AG_ME_T_GL" :
   {
   removeAllWeapons _x;
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "1Rnd_HE_Grenade_shell";
   _x addMagazine "1Rnd_HE_Grenade_shell";
   _x addMagazine "1Rnd_HE_Grenade_shell";
   _x addMagazine "1Rnd_HE_Grenade_shell";
   _x addMagazine "1Rnd_HE_Grenade_shell";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
         _x addWeapon "arifle_mas_akms_gl";
   };
 case "CAF_AG_ME_T_PKM" :
   {
   removeAllWeapons _x;
   _x addBackpack "B_TacticalPack_rgr";
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "100Rnd_mas_762x54_mag";
   _x addMagazine "100Rnd_mas_762x54_mag";
   _x addMagazine "100Rnd_mas_762x54_mag";
   _x addMagazine "100Rnd_mas_762x54_mag";
         _x addWeapon "LMG_mas_pkm_F";
   };
 case "CAF_AG_ME_T_RPG" :
   {
   removeAllWeapons _x;
   //_x addBackpack "B_TacticalPack_rgr";
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
   _x addMagazine "30Rnd_mas_762x39_mag";
         _x addWeapon "arifle_mas_akms";
   _x addMagazine "mas_PG7V";
   _x addMagazine "mas_PG7V";
   _x addMagazine "mas_OG7";
   _x addMagazine "mas_OG7";
   _x addMagazine "mas_OG7";
         _x addWeapon "mas_launch_RPG7_F";
   };
 case "CAF_AG_ME_T_RPK74" :
   {
   removeAllWeapons _x;
   _x addBackpack "B_TacticalPack_rgr";
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "100Rnd_mas_545x39_mag";
   _x addMagazine "100Rnd_mas_545x39_mag";
   _x addMagazine "100Rnd_mas_545x39_mag";
   _x addMagazine "100Rnd_mas_545x39_mag";
         _x addWeapon "LMG_mas_rpk_F";
   };
 case "CAF_AG_ME_T_SVD" :
   {
   removeAllWeapons _x;
   _x addMagazine "SmokeShell";
   _x addMagazine "SmokeShell";
   _x addMagazine "HandGrenade";
   _x addMagazine "HandGrenade";
   _x addMagazine "10Rnd_mas_762x54_mag";
   _x addMagazine "10Rnd_mas_762x54_mag";
   _x addMagazine "10Rnd_mas_762x54_mag";
   _x addMagazine "10Rnd_mas_762x54_mag";
   _x addMagazine "10Rnd_mas_762x54_mag";
   _x addMagazine "10Rnd_mas_762x54_mag";
         _x addWeapon "srifle_mas_svd_h";
   };
    };
} forEach allUnits;
Exec in init.sqf:
Code:
if (isServer) then {call otl7_fnc_replaceCAFaks};