Ir para conteúdo
  • 0

Da look em si próprio e aparecer a msg falando sua patente


Zikaduh

Pergunta

No meu servidor você não upa seu level mas sim sua patente, ai eu to tendo esse problema.


quando da look em si próprio não amostra sua patente tipo:



Look em outro player:



14:52 Você ve Zikaduh.


[PT: Recruit III].


Ai ta certo mas quando se da look em si próprio não amostra a patente:


Look em si próprio:


14:52 Você se ver.


Eu quero que fique assim


14:52 Você se ver.

[PT: Recruit III].


Eu uso essas 2 script:



function getPT(player)


local storage = getPlayerStorageValue(player, 83922)


return storage == -1 and "" or storage

end


function onLook(cid, thing, position, lookDistance)

if isPlayer(thing.uid) then

doPlayerSetSpecialDescription(thing.uid, "\n[PT: " .. getPT(thing.uid) .."]")

end

return true

end





function onAdvance(cid, skill, oldLevel, newLevel)


local _PT = {

[1] = "Recruit",

[2] = "Recruit II",

[3] = "Recruit III"

}


local PT = _PT[newLevel]


if(skill == 8) then

if(PT) then

return setPlayerStorageValue(cid, 83922, PT)

end

end


return true

end



Tem como alguem me ajuda nisso

Editado por Zikaduh
Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

eu coloquei esse mais so funciono o de level e o do fish n funciono e eu fiquei meio sem inteder nds. ;/

eu vo passa aqui logo tudo que eu preciso.

 

- Pantente -- Level (8)
- Knife/Hand -- Fist (0)
- Pistol/Ammo -- Club (1)
- Stogun/Ammo -- Sword (2)
- SMG/Ammo -- Axe (3)
- Rifle/Ammo -- Distance (4)
- Score -- Shield (5)
- Deaths -- Fishing (6)

 

tem como você coloca logo tudo isso em uma script só.

eu ia fazer isso é que eu não intendi a script ai tem como vc fazer a script toda completa então.

 

So muito BURRO vey.

 

to sem rep depois te do +2


@up


up

Editado por Zikaduh
Link para o comentário
Compartilhar em outros sites

  • 0

Provavelmente não apareceu nada porquê eu sem querer deixei o level de fishing muito alto e.e

 

 

local fishing_table = {
    [10] = "oi",   --[lv de fishing] = título,
    [20] = "fmz?",
    [30] = "flw",
}
 
local fist_table = {
    [10] = "a",    --[lv de fist fighting] = título,
    [20] = "aa",
    [30] = "aaa",
}
 
local sword_table = {
    [10] = "a",    --[lv de sword] = título,
    [20] = "aa",
    [30] = "aaa",
}
 
local shield_table = {
    [10] = "a",    --[lv de shield] = título,
    [20] = "aa",
    [30] = "aaa",
}
 
local club_table = {
    [10] = "a",    --[lv de club] = título,
    [20] = "aa",
    [30] = "aaa",
}
 
local distance_table = {
    [10] = "a",    --[lv de distance = título,
    [20] = "aa",
    [30] = "aaa",
}
 
local axe_table = {
    [10] = "a",    --[lv de axe] = título,
    [20] = "aa",
    [30] = "aaa",
}
 
function onLook(cid, thing, position, lookDistance)
 
local fish = {}
local fist = {}
local sword = {}
local axe = {}
local distance = {}
local club = {}
local shield = {}
    
    if isPlayer(thing.uid) then
        for a, b in pairs(fishing_table) do
            if getPlayerSkillLevel(cid, 6) >= a then
                if fish[1] ~= "" then
                    local c = fish[1]
                    local d = table.find(fish, c)
                    table.remove(fish, d)
                end
                table.insert(fish, b)
            end
        end
        for a, b in pairs(fist_table) do
            if getPlayerSkillLevel(cid, 0) >= a then
                if fist[1] ~= "" then
                    local c = fist[1]
                    local d = table.find(fist, c)
                    table.remove(fist, d)
                end
                table.insert(fist, b)
            end
        end
        for a, b in pairs(sword_table) do
            if getPlayerSkillLevel(cid, 2) >= a then
                if sword[1] ~= "" then
                    local c = sword[1]
                    local d = table.find(sword, c)
                    table.remove(sword, d)
                end
                table.insert(sword, b)
            end
        end
        for a, b in pairs(shield_table) do
            if getPlayerSkillLevel(cid, 5) >= a then
                if shield[1] ~= "" then
                    local c = shield[1]
                    local d = table.find(shield, c)
                    table.remove(shield, d)
                end
                table.insert(shield, b)
            end
        end
        for a, b in pairs(club_table) do
            if getPlayerSkillLevel(cid, 1) >= a then
                if club[1] ~= "" then
                    local c = club[1]
                    local d = table.find(club, c)
                    table.remove(club, d)
                end
                table.insert(club, b)
            end
        end
        for a, b in pairs(distance_table) do
            if getPlayerSkillLevel(cid, 4) >= a then
                if distance[1] ~= "" then
                    local c = distance[1]
                    local d = table.find(distance, c)
                    table.remove(distance, d)
                end
                table.insert(distance, b)
            end
        end
        for a, b in pairs(axe_table) do
            if getPlayerSkillLevel(cid, 3) >= a then
                if axe[1] ~= "" then
                    local c = axe[1]
                    local d = table.find(axe, c)
                    table.remove(axe, d)
                end
                table.insert(axe, b)
            end
        end
        local name = thing.uid == cid and "voce mesmo" or getCreatureName(thing.uid)
        local sto = getPlayerStorageValue(thing.uid, 83922)
        local patente = tonumber(sto) ~= nil and "" or sto
        local kill = table.concat(fish, "")
        local knife = table.concat(fist, "")
        local pistol = table.concat(club, "")
        local stogun = table.concat(sword, "")
        local smg = table.concat(axe, "")
        local rifle = table.concat(distance, "")
        local score = table.concat(shield, "")
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ve "..name..".\n[Patente:"..patente.."].\n[Kill:"..kill.."] [Knife/Hand:"..knife.."] [Pistol/Ammo:"..pistol.."].\n[Stogun/Ammo:"..stogun.."] [SMG/Ammo:"..smg.."] [Rifle/Ammo:"..rifle.."].\nScore: "..score..".")
        return false
    end
    return true
end

 

 

Editado por zipter98
Link para o comentário
Compartilhar em outros sites

  • 0

cara vlw.

vc e foda

funciono direitinho

 

15:54 Voce ve voce mesmo.
[Patente:Recruit III].
[Kill:fmz?].
[Knife/Hand:a].
[Pistol/Ammo:aa].
[stogun/Ammo:a].
[sMG/Ammo:a].
[Rifle/Ammo:a].
Score: a.
depois te do mais 2 rep to sem rep.
#pode fecha o topico
Link para o comentário
Compartilhar em outros sites

  • 0

zipter98, voce poderia fazer pra min tambem um script tipo esse ai do Zikaduh, so que em vez de apareçer a patente, mostra o reset que o player tem ao dar look em si mesmo?, tipo, quando o player da look nele mesmo, a funçao de reset do server é

getPlayerReset(cid)
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...