There you go:
_manone = _this select 0
_mantwo = _this select 1
_vehicle = _this select 2
_manone SetBehaviour "careless"
_mantwo SetBehaviour "careless"
_manone MoveInDriver _vehicle
_mantwo MoveInCargo _vehicle
_vehicle AddWeaponCargo ["ak47",2]
_vehicle AddMagazineCargo ["ak47",20]
_vehicle AddWeaponCargo ["kozlice",2]
_vehicle AddMagazineCargo ["kozliceball",12]
_vehicle AddMagazineCargo ["kozliceshell",6]
#check
@ not (_manone in _vehicle) and not (_mantwo in _vehicle)
#getammo
_manone action ["take weapon",_vehicle,0,0,"ak47"]
_manone playmove "CombatReloadMagazine"
_mantwo action ["take weapon",_vehicle,0,0,"ak47"]
_mantwo playmove "CombatReloadMagazine"
When they take the weapon, they'll automatically take as much ammo as they can, so you either let them take 10 mags each or don't add any ammo to the car and add the mags manually, like so:
_manone = _this select 0
_mantwo = _this select 1
_vehicle = _this select 2
_manone SetBehaviour "careless"
_mantwo SetBehaviour "careless"
_manone MoveInDriver _vehicle
_mantwo MoveInCargo _vehicle
_vehicle AddWeaponCargo ["ak47",2]
_vehicle AddWeaponCargo ["kozlice",2]
_vehicle AddMagazineCargo ["kozliceball",12]
_vehicle AddMagazineCargo ["kozliceshell",6]
#check
@ not (_manone in _vehicle) and not (_mantwo in _vehicle)
#getammo
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone addmagazine "ak47"
_manone action ["take weapon",_vehicle,0,0,"ak47"]
_manone playmove "CombatReloadMagazine"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo addmagazine "ak47"
_mantwo action ["take weapon",_vehicle,0,0,"ak47"]
_mantwo playmove "CombatReloadMagazine"
Btw, the reload action doesn't work.