Postado Junho 22, 2023 1 ano Autor 3 horas atrás, L3K0T disse: local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} local playerVocation = getPlayerVocation(cid) if playerVocation and tab[playerVocation] then doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerVocation]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efeito mágico adicionado end if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end Error ao relogar Citar [19:52:32.993] [Error - CreatureScript Interface] [19:52:32.995] In a timer event called from: [19:52:32.995] data/creaturescripts/scripts/effect_vocation.lua:onLogin [19:52:32.996] Description: [19:52:32.997] (internalGetPlayerInfo) Player not found when requesting player info #6
Postado Junho 23, 2023 1 ano Diretor Solução local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) if not isPlayer(cid) then -- Verifica se o jogador ainda é válido return true end local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} local playerVocation = getPlayerVocation(cid) if playerVocation and tab[playerVocation] then doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerVocation]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efeito mágico adicionado end addEvent(ariseText, 1000, cid) return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end
Postado Junho 23, 2023 1 ano Autor 33 minutos atrás, L3K0T disse: local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) if not isPlayer(cid) then -- Verifica se o jogador ainda é válido return true end local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} local playerVocation = getPlayerVocation(cid) if playerVocation and tab[playerVocation] then doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], tab[playerVocation]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efeito mágico adicionado end addEvent(ariseText, 1000, cid) return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end Muito obrigado amigo, funciou direitinho agora ! Deus te abençoe !
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.