In your init.sqs, typoe the following
[Player] exec "Reload.sqs"
Then create the following script
_________________________________________________________________________
;;;;Reload.sqs
?(local server):exit
@time > 1
_weapArray = weapons player
_magArray = magazines player
_primary = primaryweapon player
?(_primary == "M16GrenadeLauncher"): _primary = "M16Muzzle"
?(_primary == "Ak74GrenadeLauncher"): _primary = "AK74Muzzle"
?(_primary == "Ak47GrenadeLauncher"): _primary = "AK47Muzzle"
#START
@alive player
removeAllWeapons player
{player addMagazine _x} forEach _magArray
{player addWeapon _x} forEach _weapArray
player selectWeapon _primary
goto "START"
___________________________________________________________________
Script is untested but should work
What it does is waits till (@time > 1) more than 1 second has passed in the gam,e, then it looks at what weapons and ammunition the player is carrying.
It saves theis loadout in arrays
It then waits for the player to die and respawn (@alive player)
It then removes the default weapon loadout that BIS gives soldiers of that particular weapon class (removeAllWeapons player), so that there is enough space to reload the player with the loadout he had at the 1 second point
You can adjust the (@time > 1) to allow players more time to take weapons from crates before the script stores their loadout
There are other ways, such as reloadguy.sqs which will load players with a specific pre designed loadout of a mapmakers choosing. (This can be found in the Editors depot)
Many options available