Man admits accidentally shooting his mate