Olá abigos, eu estava tentando fazer um script que quando acaba a premium do player ele seja teleportado para o templo, eu achei um script do Vodkart(<3 rçrçrçrç) e modificquei... Eu queria saber se isso irá funcionar sem bugs.
Script original do Vodkart:
--[[ by vodkart ]]--
function onLogin(cid)
if getPlayerStorageValue(cid, 13540) - os.time() > 0 then
setPlayerStorageValue(cid, 9898, 1)
elseif getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid, "Sua vip Account acabou.")
setPlayerStorageValue(cid, 9898, -1)
end
return TRUE
end
Meu script:
function onLogin(cid)
if isPremium(cid) then
else
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid, "Sua Premium Account acabou.")
end
return TRUE
end
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Eu testei e deu um erro, toda vez que o char loga ele vai para o templo, mesmo se o player estivesse free já.