It works, but it took me hours to solve the problem of looping the script to give all the specific ammo to the other guy...
I wanted to add the number of magazines given in a sidechat sentence, (+ a different one if there's only one magazine given) with the %1 and a variable, but i was unable to do a corect script...
Do you have an idea?
here's my code: (don't need to add the gun, the guy has his weapon, but no ammo)
_armed = _player
_unarmed = _hostage
_mag = "15Rnd_9x19_M9SD"
_magnumber=0
#loop
if (_mag in (magazines _player)) then {goto "muni"} else {goto "exit"}
#muni
jenai=true
_armed removeMagazine _mag
_unarmed addMagazine _mag
_magnumber=_magnumber+1
goto "loop"
#exit
~0.6
if (_mag in (magazines _hostage)) then {_player sidechat localize "str_mag1"}
~3
if (_mag in (magazines _hostage)) then {reload _hostage}
exit