_player = player;

{_player addmagazine _x} forEach EGG_EVO_pallammo;
{_player addweapon _x} forEach EGG_EVO_pweapons;
{_player addprimaryweaponitem _x} forEach EGG_EVO_pweaponitems;
{_player addhandgunitem _x} forEach EGG_EVO_hweaponitems;

_player removeAction EGG_actionId9;

//if (count weapons _player > 5) then
//first 5 weapons are actually items

//{
//  private['_type', '_type0','_mz'];

_type0 = (handgunweapon _player);
_player addMagazine (getArray(configFile>>"CfgWeapons">>_type0>>"magazines") select 0); // add handgun weapon mag

//_type = ((weapons _player) select 5);//was 0
/*
_type = (primaryweapon _player);
_player addMagazine (getArray(configFile>>"CfgWeapons">>_type>>"magazines") select 0); // add primary weapon mag
_mz = getArray(configFile>>"CfgWeapons">>_type>>"muzzles");
{ if (_x != "this") then { _player addMagazine (getArray(configFile>>"CfgWeapons">>_type>>_x>>"magazines") select 0); }; } forEach _mz; // add one mag for each muzzle   

  if (count _mz > 1) then
  {
    _player selectWeapon (_mz select 0);
  }
  else
  {
    _player selectWeapon _type;
  };
//};
*/
_player selectweapon (handgunweapon _player);
_player action ["WeaponInHand",_player];
EGG_drawweaponon = false;
EGG_spyactive = 1;
