Here is a script, lets just call it equipment.sqs, obviously I just used standard west weapon loadouts for an example
; this goes in units init line [this, "law"] exec "equipment.sqs"
_unit = _this select 0
_type = _this select 1
goto "loadout"
#loadout
? ( _type == "OFFICER") : goto "Officer"
? ( _type == "LAW") : goto "LAW"
exit
#Officer
removeallweapons _unit
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "handgrenade"
_unit addmagazine "handgrenade"
_unit addmagazine "smokeshell"
_unit addmagazine "smokeshell"
_unit addweapon "m16"
_unit addweapon "binocular"
_unit addweapon "NVgoggles"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addweapon "beretta"
exit
#Law
removeallweapons _unit
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "m16"
_unit addmagazine "lawlauncher"
_unit addmagazine "lawlauncher"
_unit addmagazine "handgrenade"
_unit addmagazine "handgrenade"
_unit addweapon "m16"
_unit addweapon "lawlauncher"
_unit addweapon "NVgoggles"
exit
It is not great but essentially you only have to write the loadout once...
This should work.... Make a script... "equipment.sqs" file put the above script in and add as many variants as you wish and for each soldier load out, put in his init line
[this, "law"] exec "equipment.sqs"
The second part of the execution of the script function "_type = _this select 1" can have as many types as you wish,
? ( _type == "SPECOP") : goto "SPECOP"
#Specop
removeallweapons _unit
_unit addmagazine "m4"
_unit addmagazine "m4"
_unit addmagazine "m4"
_unit addmagazine "M4"
_unit addmagazine "handgrenade"
_unit addmagazine "handgrenade"
_unit addmagazine "Pipebomb"
_unit addmagazine "lawlauncher"
_unit addweapon "XMS"
_unit addweapon "lawlauncher"
_unit addweapon "binocular"
_unit addweapon "NVgoggles"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addmagazine "berettamag"
_unit addweapon "beretta"
exit
Remember to "exit" after each loadout or the script will run through all the loadouts until the unit has the last one available
---
Sometimes especially when you spawn a new unit with "createunit" you will have to put two inverted commas ("") around the weapon _type and file name
[this, ""law""] exec ""equipment.sqs""
Regards
Kendo