Not sure if this has been released, But i thought it would be helpful for those who dont have it.
Lua:
function isPlayerOnline(player)
local check = db.getResult("SELECT `online` FROM `players` WHERE `id` = " .. player .. ";")
local on = check:getDataInt("online")
if on ~= 0 then
return TRUE
else
return FALSE
end
end