- Joined
- Oct 22, 2013
- Messages
- 421
- Reaction score
- 176
look for
and make it look like this
you can change the
Credits: GetRektBambi
Code:
void obj_Zombie::DoDeath(bool fakeDeath)
Code:
void obj_Zombie::DoDeath(bool fakeDeath){
extern wiInventoryItem RollItem(const LootBoxConfig* lootCfg, int depth);
// drop loot
if(!fakeDeath && spawnObject->lootBoxCfg)
{
int HowManyToDrop = 1;
if( IsSuperZombie()) HowManyToDrop = 20;
for(int Amount = 0; Amount < HowManyToDrop; Amount++)
{
wiInventoryItem wi = RollItem(spawnObject->lootBoxCfg, 0);
if(wi.itemID > 0)
{
// create random position around zombie
r3dPoint3D pos = GetPosition();
pos.y += 0.4f;
pos.x += u_GetRandom(-1, 1);
pos.z += u_GetRandom(-1, 1);
// create network object
obj_DroppedItem* obj = (obj_DroppedItem*)srv_CreateGameObject("obj_DroppedItem", "obj_DroppedItem", pos);
obj->SetNetworkID(gServerLogic.GetFreeNetId());
obj->NetworkLocal = true;
// vars
obj->m_Item = wi;
}
}
}
you can change the
for how many items you want to dropHowManyToDrop = 20;
Credits: GetRektBambi
Last edited: