nanduzenho
Member
Good morning, anyone know why it's not working?
Lua:
local STORAGE_PREMIUM = PremiumDays
local TEMPLE_ID = 2
function onLogin(cid)
local player = Player(cid)
if player:getPremiumDays() < 1 and player:getStorageValue(PremiumDays) > 0 then
player:setStorageValue(PremiumDays, 0)
player:teleportTo(Town(TEMPLE_ID):getTemplePosition())
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:setTown(TEMPLE_ID)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Sua premium acabou!")
end
return true
end