[Help] How configure loot airdrop?
Hello friends, my airdrop is falling, but is falling without loot. What can it be? How to solve? And where change?
Can be it ?
Code:
obj_DroppedItem* obj = (obj_DroppedItem*)srv_CreateGameObject("obj_DroppedItem", "obj_DroppedItem", AirDropSpawn);
obj->AirDropPos = AirDropSpawn;
obj->m_FirstTime = 1;
obj->ExpireFirstTime= r3dGetTime() + 5.0f;
obj->m_DefaultItems = 1;
obj->m_LootBoxID1 = 0;
obj->m_LootBoxID2 = 0;
obj->m_LootBoxID3 = 0;
obj->m_LootBoxID4 = 0;
obj->m_LootBoxID5 = 0;
obj->m_LootBoxID6 = 0;
obj->SetPosition(AirDropSpawn);
SetupPlayerNetworkItem(obj);
// vars
obj->m_Item = wi;
obj->m_Item.quantity = 1;
Re: [Help] How configure loot airdrop?
This is the first time I'm ever seeing that code, but I'm pretty sure you need to change that 0 to the ID of a lootbox that's in your itemsDB and database.
Re: [Help] How configure loot airdrop?
Quote:
Originally Posted by
Laenoar
This is the first time I'm ever seeing that code, but I'm pretty sure you need to change that 0 to the ID of a lootbox that's in your itemsDB and database.
I think it. I go try.
- - - Updated - - -
I change here too?
Code:
obj_AirDropSpawn::obj_AirDropSpawn()
: spawnRadius(20)
{
serializeFile = SF_ServerData;
m_LootBoxID1 = 0;
m_LootBoxID2 = 0;
m_LootBoxID3 = 0;
m_LootBoxID4 = 0;
m_LootBoxID5 = 0;
m_LootBoxID6 = 0;
m_DefaultItems = 1;
}
Re: [Help] How configure loot airdrop?
can be too much problems but check for
sobj_DroppedItem.cpp
there you can check what items your airdrop spawn in the getposition area by default
Code:
int obj_DroppedItem::GetItemDefault(int i)
Re: [Help] How configure loot airdrop?