Ir para conteúdo

Featured Replies

Postado

Eae galera estou com um erro que queria resolver , tipo eu tinha um script do action que entregava todos os addons ao puxar a alavanca, usava no ot 7.8 e depois passei a usar no ot 8.7 , só que agora estou usando ot 10.77 e tentei passar esse script pra lá e da uns erros, se alguém pode me ajudar por gentileza obg.

 

 

 

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

1808979638_Erroalavanca.thumb.PNG.8c0fc3a202ab8c699c52e1f18e6590a8.PNG

 

Você tem o código disponível? Se tiver publique-o aqui: 

Citar

function onUse(cid, item, frompos, item2, topos)


if isPremium(cid) and item.uid == 10001 and item.itemid == 1945 then

doPlayerAddAddon(cid, 128, 1)    
doPlayerAddAddon(cid, 129, 1)    
doPlayerAddAddon(cid, 130, 1)    
doPlayerAddAddon(cid, 131, 1)    
doPlayerAddAddon(cid, 132, 1)
doPlayerAddAddon(cid, 133, 1)    
doPlayerAddAddon(cid, 134, 1)
doPlayerAddAddon(cid, 135, 1)
doPlayerAddAddon(cid, 136, 1)
doPlayerAddAddon(cid, 137, 1)
doPlayerAddAddon(cid, 138, 1)
doPlayerAddAddon(cid, 139, 1)
doPlayerAddAddon(cid, 140, 1)
doPlayerAddAddon(cid, 141, 1)
doPlayerAddAddon(cid, 142, 1)
doPlayerAddAddon(cid, 143, 1)
doPlayerAddAddon(cid, 144, 1)
doPlayerAddAddon(cid, 145, 1)
doPlayerAddAddon(cid, 146, 1)
doPlayerAddAddon(cid, 147, 1)
doPlayerAddAddon(cid, 148, 1)
doPlayerAddAddon(cid, 149, 1)
doPlayerAddAddon(cid, 150, 1)
doPlayerAddAddon(cid, 151, 1)
doPlayerAddAddon(cid, 152, 1)
doPlayerAddAddon(cid, 153, 1)
doPlayerAddAddon(cid, 154, 1)
doPlayerAddAddon(cid, 155, 1)
doPlayerAddAddon(cid, 156, 1)
doPlayerAddAddon(cid, 157, 1)
doPlayerAddAddon(cid, 158, 1)
doPlayerAddAddon(cid, 128, 2)    
doPlayerAddAddon(cid, 129, 2)    
doPlayerAddAddon(cid, 130, 2)    
doPlayerAddAddon(cid, 131, 2)    
doPlayerAddAddon(cid, 132, 2)
doPlayerAddAddon(cid, 133, 2)    
doPlayerAddAddon(cid, 134, 2)
doPlayerAddAddon(cid, 135, 2)
doPlayerAddAddon(cid, 136, 2)
doPlayerAddAddon(cid, 137, 2)
doPlayerAddAddon(cid, 138, 2)
doPlayerAddAddon(cid, 139, 2)
doPlayerAddAddon(cid, 140, 2)
doPlayerAddAddon(cid, 141, 2)
doPlayerAddAddon(cid, 142, 2)
doPlayerAddAddon(cid, 143, 2)
doPlayerAddAddon(cid, 144, 2)
doPlayerAddAddon(cid, 145, 2)
doPlayerAddAddon(cid, 146, 2)
doPlayerAddAddon(cid, 147, 2)
doPlayerAddAddon(cid, 148, 2)
doPlayerAddAddon(cid, 149, 2)
doPlayerAddAddon(cid, 150, 2)
doPlayerAddAddon(cid, 151, 2)
doPlayerAddAddon(cid, 152, 2)
doPlayerAddAddon(cid, 153, 2)
doPlayerAddAddon(cid, 154, 2)
doPlayerAddAddon(cid, 155, 2)
doPlayerAddAddon(cid, 156, 2)
doPlayerAddAddon(cid, 157, 2)
doPlayerAddAddon(cid, 158, 2)
doPlayerAddAddon(cid, 251, 1)
doPlayerAddAddon(cid, 252, 1)
doPlayerAddAddon(cid, 251, 2)
doPlayerAddAddon(cid, 252, 2)

doPlayerSendTextMessage(cid,22,"You got all addons.")
setPlayerStorageValue(cid,10001,1)

end
end
 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

1808979638_Erroalavanca.thumb.PNG.8c0fc3a202ab8c699c52e1f18e6590a8.PNG

  • Respostas 7
  • Visualizações 892
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local t = { [128] = {addon1 = true, addon2 = true}, -- [looktype outfit] = {addon1 = 'true' para dar o addon1, 'false' para não dar, addon2 (mesma coisa)} [129] = {addon1 = true, addon2 = tru

  • @Master68 Antes disso  if player:getStorageValue(10001) == -1 then Coloque isso local player = Player(player)

  • @Master68 tenta if isPlayer @Master68 parece q sua source nao reconhece a função.

Posted Images

Postado
local t = {
    [128] = {addon1 = true, addon2  = true}, -- [looktype outfit] = {addon1 = 'true' para dar o addon1, 'false' para não dar, addon2 (mesma coisa)}
    [129] = {addon1 = true, addon2 = true},
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getStorageValue(10001) == -1 then
        local check = false
        for looktype, addontab in pairs(t) do
            if player:hasOutfit(looktype) then
                check = true
                for i = 1, 2 do
                    player:addOutfitAddon(looktype, i == 1 and (addontab.addon1 and 1) or (addontab.addon2 and 2))
                end
            end
        end
        if check then
            player:sendTextMessage(MESSAGE_INFO_DESCR, "You have received new addons!")
            player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
        end
        player:setStorageValue(10001, 1)
        item:transform(item:getId() == 1945 and 1946 or 1945)
    end
    return true
end

Adicione as demais linhas para os outros looktypes conforme os exemplos.

Contato:

 

Postado
  • Autor
22 minutos atrás, Dwarfer disse:

local t = {
    [128] = {addon1 = true, addon2  = true}, -- [looktype outfit] = {addon1 = 'true' para dar o addon1, 'false' para não dar, addon2 (mesma coisa)}
    [129] = {addon1 = true, addon2 = true},
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if player:getStorageValue(10001) == -1 then
        local check = false
        for looktype, addontab in pairs(t) do
            if player:hasOutfit(looktype) then
                check = true
                for i = 1, 2 do
                    player:addOutfitAddon(looktype, i == 1 and (addontab.addon1 and 1) or (addontab.addon2 and 2))
                end
            end
        end
        if check then
            player:sendTextMessage(MESSAGE_INFO_DESCR, "You have received new addons!")
            player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
        end
        player:setStorageValue(10001, 1)
        item:transform(item:getId() == 1945 and 1946 or 1945)
    end
    return true
end

Adicione as demais linhas para os outros looktypes conforme os exemplos.

 

olá , estava procurando no tk até agora, vi sua resposta agora tentei e o erro agora da esse

 

Citar

907724376_errocontinua.thumb.PNG.1bc235ed0282854666507c9b4b80c547.PNG

 

Postado
  • Autor
Em 17/07/2019 em 23:30, Bolletox disse:

@Master68 Antes disso 


 if player:getStorageValue(10001) == -1 then

Coloque isso local player = Player(player)

 

coloquei mais puxa alavanca ela vai pra lá e pra cá e nada acontece como estivesse só lá sem nada msm

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo