Ir para conteúdo
  • Cadastre-se

(Resolvido)Look do player não mostra toda a descrição.


Ir para solução Resolvido por KotZletY,

Posts Recomendados

Estou com um problema no look do player, oque acontece é o seguinte, estou usando 3 sistemas que adicionam uma descrição no look do player;

O sistema de graduações que adiciona no look do player a descrição falando se ele é shinobi, genin, chunin, jounin, anbu ou sennin. 

O sistema jinchuuriki, que adiciona no look do player a descrição falando se ele é o não é um jinchuuriki.

O sistema de patentes, que adiciona uma patente no look do player de acordo com o numero de players que ele já matou.

 

Tem esses 3 sistemas que adicionam descrição no look do player, mas somente uma aparece quando da look no player. Eu precisava que todas aparecessem quando desse look no player.

 

Host bom para hospedar seu jogo => https://shre.ink/OminiHost

 

Link para o post
Compartilhar em outros sites

@quemtuacha a função seta apenas a descrição especial, o que faz o look realmente é um script.

 

Me passe as funções que retornam o look do player e irei editar em um script de look.

Tópico movido para suporte de scripts, preste mais atenção na próxima vez, leia as regras de postagem e a descrição das áreas e saberá onde postar! 

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites
7 horas atrás, KotZletY disse:

@quemtuacha a função seta apenas a descrição especial, o que faz o look realmente é um script.

 

Me passe as funções que retornam o look do player e irei editar em um script de look.

Tópico movido para suporte de scripts, preste mais atenção na próxima vez, leia as regras de postagem e a descrição das áreas e saberá onde postar! 

 

Bom vamos la,

essa é a função do mod de ranks de patente.

Spoiler

  <event type = "look" name = "ranksLook" event = "script"><![CDATA[
   domodlib("ranks")
   function onLook(cid, thing, position, lookDistance)
    if(isPlayer(thing.uid)) then
     local rank = {rank = "Shinobi Passive", frags = 0}
     for k, v in pairs(titles) do
      if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
       if(k - 1 > rank.frags) then
        rank.rank, rank.frags = v, k - 1
       end
      end
     end
     doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank)
    end
    return true
   end
  ]]></event>

essa do sistema jinchuriki

Spoiler

function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
 if jin.getPlayerBijuu(thing.uid) ~= 0 then
  doPlayerSetSpecialDescription(thing.uid, "\nJinchuuriki de: ["..jin.getPlayerBijuu(thing.uid).."]")
 else
  doPlayerSetSpecialDescription(thing.uid, "\nNão é um Jinchuuriki.")
 end
end 
 return true
end

 

e essa das graduações:

Spoiler

function onLook(cid, thing, position, lookDistance)
    if isPlayer(thing.uid) and thing.uid ~= cid then
local type = getPlayerStorageValue(thing.uid, 89745)
        doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(cid) == 0 and "Ela" or "Ele").." é um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
        return true
    elseif thing.uid == cid then
type = getPlayerStorageValue(cid, 89745)
        doPlayerSetSpecialDescription(cid, "\nSeu nivel é de "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage")..".")
        local string = 'You see yourself.'
        if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
            string = string..' Você é um(a) '.. getPlayerGroupName(cid) ..'.'
        elseif getPlayerVocation(cid) ~= 0 then
            string = string..' Você é um(a) '.. getPlayerVocationName(cid) ..'.'
        else
            string = string..' You have no vocation.'
        end
        string = string..getPlayerSpecialDescription(cid)..''

        if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then
            string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.'
        end

        if getPlayerGuildId(cid) > 0 then
            string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
            string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
        end

        if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then
            string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].'
        if isPlayerGhost(cid) then
            string = string..'\n*GhostMode*'
        end
            string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.'
        end

        if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then
            string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].'
        end
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)  
        return false
    end
    return true
end
 

 

 

Host bom para hospedar seu jogo => https://shre.ink/OminiHost

 

Link para o post
Compartilhar em outros sites
  • Solução

@quemtuacha você já tem o script de look, é o terceiro que você mostrou ae.

Quando você adicionar algo novo que precise ser adicionado no look, você deve adaptar o mesmo no script que você já tem, em vez de criar um novo com a função doPlayerSetSpecialDescription,

afinal ela só seta 1x, se tiver 2x a primeira que for setada irá prevalecer, se você observe o script abaixo que irei lhe passar, ambos sistema de graduação estão e o meu jinchuuriki, estão na mesma função, assim que for usado o getPlayerSpecialDescription, ele irá retornar toda a descrição presente no mesmo:

Spoiler

function onLook(cid, thing, position, lookDistance)
domodlib("ranks")
 local rank = {rank = "Shinobi Passive", frags = 0}
  for k, v in pairs(titles) do
   if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
    if(k - 1 > rank.frags) then
     rank.rank, rank.frags = v, k - 1
    end
   end
  end

if isPlayer(thing.uid) and thing.uid ~= cid then
 if jin.getPlayerBijuu(thing.uid) ~= 0 then
  doPlayerSetSpecialDescription(thing.uid, "\nJinchuuriki de: ["..jin.getPlayerBijuu(thing.uid).."]\nMilitary rank:"..rank.rank.."\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." é um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
 else
  doPlayerSetSpecialDescription(thing.uid, "\nNão é um Jinchuuriki.\nMilitary rank:"..rank.rank.."\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." é um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
 end
 return true
elseif thing.uid == cid then
 local string = 'You see yourself.'
 if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
  string = string..' You are '.. getPlayerGroupName(cid) ..'.'
 elseif getPlayerVocation(cid) ~= 0 then
  string = string..' You are '.. getPlayerVocationName(cid) ..'.'
 else
  string = string..' You have no vocation.'
 end
 string = string..getPlayerSpecialDescription(cid)..''

if getPlayerGuildId(cid) > 0 then 
 string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
 string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
end 

if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then
 string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].'
 string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.'
end

if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then
 string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].'
end

if jin.getPlayerBijuu(cid) ~= 0 then
 string = string.."\nJinchuuriki de: ["..jin.getPlayerBijuu(cid).."]"
else
 string = string.."\nNão é um Jinchuuriki."
end

string = string.."\nMilitary rank:"..rank.rank
string = string.."\nVocê um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage")


 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) 
 return false
end
 return true
end

 

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites
17 horas atrás, KotZletY disse:

@quemtuacha você já tem o script de look, é o terceiro que você mostrou ae.

Quando você adicionar algo novo que precise ser adicionado no look, você deve adaptar o mesmo no script que você já tem, em vez de criar um novo com a função doPlayerSetSpecialDescription,

afinal ela só seta 1x, se tiver 2x a primeira que for setada irá prevalecer, se você observe o script abaixo que irei lhe passar, ambos sistema de graduação estão e o meu jinchuuriki, estão na mesma função, assim que for usado o getPlayerSpecialDescription, ele irá retornar toda a descrição presente no mesmo:

  Ocultar conteúdo


function onLook(cid, thing, position, lookDistance)
domodlib("ranks")
 local rank = {rank = "Shinobi Passive", frags = 0}
  for k, v in pairs(titles) do
   if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
    if(k - 1 > rank.frags) then
     rank.rank, rank.frags = v, k - 1
    end
   end
  end

if isPlayer(thing.uid) and thing.uid ~= cid then
 if jin.getPlayerBijuu(thing.uid) ~= 0 then
  doPlayerSetSpecialDescription(thing.uid, "\nJinchuuriki de: ["..jin.getPlayerBijuu(thing.uid).."]\nMilitary rank:"..rank.rank.."\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." é um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
 else
  doPlayerSetSpecialDescription(thing.uid, "\nNão é um Jinchuuriki.\nMilitary rank:"..rank.rank.."\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." é um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
 end
 return true
elseif thing.uid == cid then
 local string = 'You see yourself.'
 if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
  string = string..' You are '.. getPlayerGroupName(cid) ..'.'
 elseif getPlayerVocation(cid) ~= 0 then
  string = string..' You are '.. getPlayerVocationName(cid) ..'.'
 else
  string = string..' You have no vocation.'
 end
 string = string..getPlayerSpecialDescription(cid)..''

if getPlayerGuildId(cid) > 0 then 
 string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
 string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
end 

if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then
 string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].'
 string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.'
end

if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then
 string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].'
end

if jin.getPlayerBijuu(cid) ~= 0 then
 string = string.."\nJinchuuriki de: ["..jin.getPlayerBijuu(cid).."]"
else
 string = string.."\nNão é um Jinchuuriki."
end

string = string.."\nMilitary rank:"..rank.rank
string = string.."\nVocê um(a) "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage")


 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) 
 return false
end
 return true
end

 

 

entendi, vlw mestre.

 

Host bom para hospedar seu jogo => https://shre.ink/OminiHost

 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo