Ir para conteúdo

[RESOLVIDO] -=[TFS]=- 0.3.6 - 8.60 - PET SYSTEM PRECISA DE STORAGE MAIS NAO TA PEGANDO RECONHECENDO AS STORAGE

Featured Replies

Postado

 

Precisa dessas 3 storage mais não ta funcionando     local requiredStorage1 = 91811
    local requiredStorage2 = 13546     local storageValue = 83712

 

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local petName = "[PET] NIVEL MAXIMO"
    local requiredStorage1 = 91811
    local requiredStorage2 = 13546
    local storageValue = 83712
    local playerPets = getCreatureSummons(cid)

    -- Check if the player has the required immortality storages
    if getPlayerStorageValue(cid, requiredStorage1) == 1 and getPlayerStorageValue(cid, requiredStorage2) == 1 then
        -- Check if the player already has a summoned pet
        if #playerPets <= 0 then
            -- If no pet is summoned, summon a new one
            local newPet = doSummonMonster(cid, petName)
            if newPet then
                setPlayerStorageValue(cid, storageValue, 1)
            end
        else
            -- If a pet is summoned, check if it's the correct one and remove it
            for _, pet in ipairs(playerPets) do
                if getCreatureName(pet) == petName then
                    doRemoveCreature(pet)
                end
            end
        end
    else
        -- If the player doesn't have the required storages, send a message
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need the immortality storage to use this item.")
    end
    return true
end

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

  • Muvukaa mudou o título para [RESOLVIDO] -=[TFS]=- 0.3.6 - 8.60 - PET SYSTEM PRECISA DE STORAGE MAIS NAO TA PEGANDO RECONHECENDO AS STORAGE

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.7k

Informação Importante

Confirmação de Termo