ZI
pedido

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

Por Zikaduh, 06 de jan. de 2014 em Scripts

script
23
2.7k
zipter98Z
08 de janeiro de 2014 às 15:40

Testado, funcionando direitinho.

 

local fishing_table = {
    [200] = "oi",   --[lv de fishing] = título,
    [300] = "fmz?",
    [400] = "flw",
}
 
function onLook(cid, thing, position, lookDistance)
 
local fish = {}
    
    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
        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, "")
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ve "..name..".\n[Patente:"..patente.."].\n[Kill:"..kill.."].")
        return false
    end
    return true
end
ZikaduhZ
09 de janeiro de 2014 às 13:32

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 Janeiro 8 por Zikaduh

zipter98Z
09 de janeiro de 2014 às 14:48

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 Janeiro 9 por zipter98

ZikaduhZ
09 de janeiro de 2014 às 15:21

deu erro:

2ynw.png

 

Deu erro e volto pra como era antes

Editado Janeiro 9 por Zikaduh

zipter98Z
09 de janeiro de 2014 às 15:45

Erro de digitação, foi mal. Já editei meu comentário acima com o código corrigido.

ZikaduhZ
09 de janeiro de 2014 às 15:57

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
zipter98Z
09 de janeiro de 2014 às 15:58

:)

Sanado, movido.

kaizy536K
09 de janeiro de 2014 às 16:26

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)