here is a script to keep the exact ammo counts in respawned inventory (works with respawn, doesn't work with revive/respawn}:
in initserver.sqf for example:
{_x setvariable ["youpi",_foreachindex,true]} foreach playableUnits;
{_x addMPEventHandler ["MPkilled", {
_unit = _this select 0;
[_unit, [missionNamespace, format ["cur_inv_%1", _unit getVariable "youpi"]]] call BIS_fnc_saveInventory;
_unit setVariable ["MGI_ammo1",_unit ammo (primaryWeapon _unit)];
_unit setVariable ["MGI_ammo2",_unit ammo (handgunWeapon _unit)];
_unit setVariable ["MGI_ammo3",_unit ammo (secondaryWeapon _unit)];
_unit setVariable ["MGI_mags",magazinesAmmoFull _unit];
_unit setVariable ["MGI_weapon",currentWeapon _unit];
}]} forEach playableUnits;
{_x addMPEventHandler ["MPRespawn", {
_unit = _this select 0;
_corpse = _this select 1;
[_unit, [missionNamespace, format ["cur_inv_%1", _unit getVariable "youpi"]]] call BIS_fnc_loadInventory;
{_unit removeMagazine _x} forEach magazines _unit;
_unit setAmmo [primaryWeapon _unit, 0];
_unit setAmmo [handGunWeapon _unit, 0];
_unit setAmmo [secondaryWeapon _unit, 0];
{ if (((_unit getVariable "MGI_mags") select _foreachindex select 3) <= 0) then {_unit addMagazine [_x select 0,_x select 1]}} forEach (_unit getVariable "MGI_mags");
_unit setAmmo [primaryWeapon _unit,_unit getVariable "MGI_ammo1"];
_unit setAmmo [handGunWeapon _unit,_unit getVariable "MGI_ammo2"];
_unit setAmmo [secondaryWeapon _unit,_unit getVariable "MGI_ammo3"];
_unit selectWeapon (_unit getVariable "MGI_weapon");
removeAllWeapons _corpse;
removeBackpackGlobal _corpse;
removeVest _corpse;
removeAllAssignedItems _corpse;
removeAllItems _corpse;
removeGoggles _corpse;
removeHeadgear _corpse;
{deleteVehicle _x} forEach nearestObjects [(getPosATL _corpse),["WeaponHolderSimulated","groundWeaponHolder"],5];
}]} forEach playableUnits;