Fethi Polat 1
Fethi Polat
InfernoShade 1
InfernoShade
Psych0SoociaL 1
Psych0SoociaL
onur akbaş 1
onur akbaş
noisiv 1
noisiv
Hikaye Ekle

Cevaplanmadı How to make items go to the ground ?

  • Konuyu başlatan Konuyu başlatan Marcelo Schuermann
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 2
  • Görüntüleme Görüntüleme 292
Katılım
5 Eki 2023
Konular
1
Mesajlar
1
Online süresi
1h 1m
Reaksiyon Skoru
0
Altın Konu
0
TM Yaşı
2 Yıl 8 Ay 16 Gün
Başarım Puanı
5
MmoLira
110
DevLira
0
Ticaret - 0%
0   0   0

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Hello, how can I make the items go to the floor when I have a full inventory? (CHEST BOX) I mean... I think it's something in the case ITEM_GIFTBOX: or bool CHARACTER::AutoGiveItemChest if someone can help me I can pay a lot thank you <3


here is my char_item.cpp




Turco:
Olá, como posso fazer com que os itens vão para o chão quando meu inventário está cheio?

Acho que há algo nessas funções:
bool CHARACTER::AutoGiveItemChest
you,
ITEM_GIFTBOX box:





turkish: Merhaba, stoğum doluyken eşyaların yere gitmesini nasıl sağlayabilirim? (CHEST BOX) Yani... Sanırım bu ITEM_GIFTBOX: veya bool CHARACTER::AutoGiveItemChest durumunda bir şey, eğer birisi bana yardım edebilirse yapabilirim. çok öde teşekkür ederim <3
 

Ekli dosyalar

umarım çözüme kavuşur başarılar
 
Kod:
case ITEM_GIFTBOX:
{
    // Check if the player's inventory is full
    if (GetEmptyInventoryCount() <= 0)
    {
        // Inventory is full, drop items on the ground
        for (int i = 0; i < count; i++)
        {
            if (item_gets[i])
            {
                // Drop the item on the ground at the player's position
                ItemDrop(item_gets[i]->GetVnum(), dwCounts[i], GetX(), GetY());
            }
        }
        
        // Inform the player that items were dropped
        ChatPacket(CHAT_TYPE_INFO, "Your inventory is full. Some items were dropped on the ground.");
    }
    else
    {
        // Inventory has space, add items to inventory as before
        // Your existing code for adding items to the player's inventory goes here
    }
    
    // ...
    break;
}
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst