Found the answer out from another user on the forums
Working Code if anyone else is interested in using in case they don't want to use email function:
FYI: Some may have to change MySQL Query because its not selecting the Prefix from vBulletin if anyone has a Prefix set for table_names!
Code:
$getcode = '';
$theuserid = $vbulletin->userinfo['userid'];
$result = $vbulletin->db ->query_read("SELECT * FROM vsa_advreg_invite WHERE inviter='$theuserid'");
while($row = $vbulletin->db->fetch_array($result))
{
$getcode .= "You invited: " . $row['invited']. "<br> Your Code to Give: ". $row['code'] . "<br>";
}