function onLogin(cid)
local home = getHouseByPlayerGUID(getPlayerGUID(cid))
if home ~= nil and not isPremium(cid) then
setHouseOwner(home, 0, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You\'ve lost your house because you are not premium anymore.')
if getHouseFromPos(getThingPos(cid)) == home then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
end
end
return true
end