I made a very simple script. I placed an addAction command to a trigger, which condition was "!alive enemy1" like so
stealUniform = enemy1 addAction["(take uniform)", "uniform.sqf", nil, 6, True, True, "", "(_target distance _this) < 4"];
On the uniform.sqf I wrote simply
//
removeUniform player;
removeHeadgear player;
player addUniform "U_OI_combatUniform_ocamo";
player addheadGear "h_helmet0_ocamo";
removeUniform enemy1;
removeheadGear enemy1;
player setCaptive true;
player removeAction stealUniform;
//
Works just fine. The enemy will not shoot you, until you make another script that when you open fire at enemy, or something like that, it sets setCaptive to false...
Only problem is that I don´t get the headgear for some reason. I checked the item name a 1000 times, and it wont work. But other than that.. incredibly simple script which works for me.