Postado Outubro 9, 2019 5 anos alguem poderia me ajudar resolver esse problema aqui? ao terminar a premium o jogador é teleportado pra thais (até ai beleza) só que, jogadores de rook guard tambem estão sendo levados para thais.... alguem pode me ajudar nisso ai? function onLogin(cid) registerCreatureEvent(cid,"FimPremium") local pos = {x = 32369, y = 32241, z = 7} if isPremium(cid) then setPlayerStorageValue(cid, 59898989, 1) elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType = 136}) doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, t) t = "Your premium account is over" doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 59898989, -1) elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 1 then doCreatureChangeOutfit(cid, {lookType = 128}) doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, t) t = "Your premium account is over" doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 59898989, -1) end return TRUE end
Postado Outubro 10, 2019 5 anos function onLogin(cid) registerCreatureEvent(cid,"FimPremium") local pos = {x = 32369, y = 32241, z = 7} if isPremium(cid) then setPlayerStorageValue(cid, 59898989, 1) elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 0 and getPlayerVocation(cid) > 0 then doCreatureChangeOutfit(cid, {lookType = 136}) doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, t) t = "Your premium account is over" doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 59898989, -1) elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 1 and getPlayerVocation(cid) > 0 then doCreatureChangeOutfit(cid, {lookType = 128}) doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, t) t = "Your premium account is over" doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 59898989, -1) end return TRUE end Eu não testei mas o que eu fiz foi adicionar: getPlayerVocation(cid) > 0 Ou seja, como um char de rook não tem vocação então ele não vai realizar o resto do algoritmo. Só ira prosseguir se o player tiver alguma vocação. @bpm91 testa e veja se funcionou! Editado Outubro 10, 2019 5 anos por Rayo (veja o histórico de edições) Contribuições: => Distribuições/Servidores [8.60] The Forgotten Server 1.3 (COMPILADO WIN x64) => Scripts/Códigos/Tutoriais Pokemon pescado aparece em volta do seu pokemon [Gesior]Dobrar pontos PagSeguro a partir de x valor doado Gostou de alguma contribuição? Rep +?
Postado Outubro 10, 2019 5 anos function onLogin(cid) local pos = {x = 32369, y = 32241, z = 7} if isPremium(cid) then setPlayerStorageValue(cid, 59898989, 1) elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerVocation(cid) > 0 then local outfit = getPlayerSex(cid) == 0 and 136 or 128 doCreatureChangeOutfit(cid, {lookType = outfit}) doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your premium account is over") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, 59898989, 0) end return true end STYLLER OT 2022
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.