Ir para conteúdo

Featured Replies

Postado
  • 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

 

  • Respostas 12
  • Visualizações 351
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local tab = {     [4] = 10, -- [vocationID] = número da cor do texto animado     [5] = 30,     [6] = 50,     [7] = 70 } function ariseText(cid)     local texts = {"' .    ,", ".    '

  • 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 -- Verifi

Posted Images

Postado
  • 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
  • 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo