Got it.
Here it is:
// Display social links
for ($i = 1; $i <= 3; $i++) {
if ($member['_tmm_sc_type'.$i] != 'nada') {
if ($member['_tmm_sc_type'.$i] == 'email') {
$output .= ' <a class="tmm_sociallink" href="mailto:'.(!empty($member['_tmm_sc_url'.$i])?$member['_tmm_sc_url'.$i]:'').'" title="'.$member['_tmm_sc_title'.$i].'"><img alt="'.$member['_tmm_sc_title'.$i].'" src="'.plugins_url('img/links/', __FILE__).$member['_tmm_sc_type'.$i].'.png"/></a>';
} else {
$output .= '<a class="tmm_sociallink" href="'.(!empty($member['_tmm_sc_url'.$i])?$member['_tmm_sc_url'.$i]:'').'" title="'.$member['_tmm_sc_title'.$i].'"><img alt="'.$member['_tmm_sc_title'.$i].'" src="'.plugins_url('img/links/', __FILE__).$member['_tmm_sc_type'.$i].'.png"/></a>';
}
}
}