Ir para conteúdo

Featured Replies

Postado

 

Spoiler

function getPlayerDesc(cid, thing, TV)
if (not isCreature(cid) or not isCreature(thing)) and not TV then return "" end

local pos = getThingPos(thing)
local ocup = youAre[getPlayerGroupId(thing)]
local rank = (getPlayerStorageValue(thing, 86228) <= 0) and "a Pokemon Trainer" or lookClans[getPlayerStorageValue(thing, 86228)][getPlayerStorageValue(thing, 862281)]
local name = thing == cid and "yourself" or getCreatureName(thing)    
local art = thing == cid and "You are" or (getPlayerSex(thing) == 0 and "She is" or "He is")
  
local str = {}
table.insert(str, "You see "..name..". "..art.." ")
if youAre[getPlayerGroupId(thing)] then
   table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".")      
else
   table.insert(str, (rank).." from ".. getTownName(getPlayerTown(thing))..".")
end
if getPlayerGuildId(thing) > 0 then
   table.insert(str, " "..art.." "..getPlayerGuildRank(thing).." from the "..getPlayerGuildName(thing)..".")
end
if TV then
   table.insert(str, " "..art.." watching TV.")
end
table.insert(str, ((isPlayer(cid) and youAre[getPlayerGroupId(cid)]) and "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" or ""))

return table.concat(str)
end

RESOLVIDO

 

 

Editado por luisamanagel (veja o histórico de edições)

Resolvido por KotZletY

Ir para solução
Postado
  • Solução

@luisamanagel

Spoiler

function getPlayerDesc(cid, thing, TV)
    if (not isCreature(cid) or not isCreature(thing)) and not TV then return "" end
    
    local pos = getThingPos(thing)
    local ocup = youAre[getPlayerGroupId(thing)]
    local rank = (getPlayerStorageValue(thing, 86228) <= 0) and "a Pokemon Trainer" or lookClans[getPlayerStorageValue(thing, 86228)][getPlayerStorageValue(thing, 862281)]
    local name = thing == cid and "yourself" or getCreatureName(thing) 
    local art = thing == cid and "You are" or (getPlayerSex(thing) == 0 and "She is" or "He is")
    
    local str = {}
    table.insert(str, "You see "..name..". "..art.." ")
    if youAre[getPlayerGroupId(thing)] then
        table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".") 
    else
        table.insert(str, (rank).." from ".. getTownName(getPlayerTown(thing))..".")
    end
    
    if hasProfession(thing) then -- Profession System
	table.insert(str, "\n "..art.." "..getProfessionName(thing)..".")
    end
    
    if getPlayerGuildId(thing) > 0 then
        table.insert(str, " "..art.." "..getPlayerGuildRank(thing).." from the "..getPlayerGuildName(thing)..".")
    end
    if TV then
        table.insert(str, " "..art.." watching TV.")
    end
    table.insert(str, ((isPlayer(cid) and youAre[getPlayerGroupId(cid)]) and "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" or ""))
    
    return table.concat(str)
end

 

 

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

Postado
  • Autor
8 minutos atrás, KotZletY disse:

@luisamanagel

  Ocultar conteúdo


function getPlayerDesc(cid, thing, TV)
    if (not isCreature(cid) or not isCreature(thing)) and not TV then return "" end
    
    local pos = getThingPos(thing)
    local ocup = youAre[getPlayerGroupId(thing)]
    local rank = (getPlayerStorageValue(thing, 86228) <= 0) and "a Pokemon Trainer" or lookClans[getPlayerStorageValue(thing, 86228)][getPlayerStorageValue(thing, 862281)]
    local name = thing == cid and "yourself" or getCreatureName(thing) 
    local art = thing == cid and "You are" or (getPlayerSex(thing) == 0 and "She is" or "He is")
    
    local str = {}
    table.insert(str, "You see "..name..". "..art.." ")
    if youAre[getPlayerGroupId(thing)] then
        table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".") 
    else
        table.insert(str, (rank).." from ".. getTownName(getPlayerTown(thing))..".")
    end
    
    if hasProfession(thing) then -- Profession System
	table.insert(str, "\n "..art.." "..getProfessionName(thing)..".")
    end
    
    if getPlayerGuildId(thing) > 0 then
        table.insert(str, " "..art.." "..getPlayerGuildRank(thing).." from the "..getPlayerGuildName(thing)..".")
    end
    if TV then
        table.insert(str, " "..art.." watching TV.")
    end
    table.insert(str, ((isPlayer(cid) and youAre[getPlayerGroupId(cid)]) and "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" or ""))
    
    return table.concat(str)
end

 

 

Vou testar em 10 minutos 

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