yes, you can do it. try this.
function is_unanswered ($postid,$userid) {
$result = qa_db_read_one_value(
qa_db_query_sub(
'SELECT postid
FROM ^posts
WHERE postid=$ AND acount = 0 AND type = 'Q',
$postid
), true);
$add_amount = 15; //how much bonus you want to award
if ($result == $postid) {
add_bonus ($userid, $add_amount);
} else {
return;
}
}
function add_bonus ($userid, $add_amount) {
$current_bonus = qa_db_query_sub(
'SELECT bonus
FROM ^userpoints
WHERE userid=$,
$userid
);
$new_bonus = $current_bonus +$add_amount;
qa_db_query_sub(
"UPDATE ^userpoints
SET bonus = $
WHERE userid= #",
$new_bonus ,$userid
);
}