local event = nil
local timeOnline = 60 * 60 * 1000
function addPremiumPoint(cid)
local player = Player(cid)
if player then
db.query("UPDATE `accounts` SET `premium_points` = premium_points + 1 WHERE `id`= " .. player:getGuid() .. " LIMIT 1');")
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You have been online for an hour and have earned 1 premium point.")
event = addEvent(addPremiumPoint, timeOnline, cid)
end
end
function onLogin(player)
if not event then
event = addEvent(addPremiumPoint, timeOnline, player:getId())
end
return true
end