You can create the view with your query:
SELECT r.rid, r.cards, to_char(r.stamp,
'DD.MM.YYYY HH24:MI') as day,
c2.bid, c2.trix, c2.pos, c2.money, c2.last_ip, c2.quit,
u.id, u.first_name, u.avatar, u.female, u.city,
u.vip > CURRENT_DATE as vip
FROM pref_rounds r
JOIN pref_cards c1 USING (rid)
JOIN pref_cards c2 USING (rid)
JOIN pref_users u ON
u.id =
c2.id;
and use this view both as the function return type and for
selecting inside the function.