• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[HELP] Pick up and not pick up items spawn

Junior Spellweaver
Joined
Jan 5, 2015
Messages
173
Reaction score
194
tutorial is pretty explanatory.

you should give more information if you want to get help.
 
Upvote 0
Newbie Spellweaver
Joined
Mar 1, 2019
Messages
21
Reaction score
0
if(base->Class->Name == "obj_SpawnedItem") {
if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return;
obj_SpawnedItem* obj = (obj_SpawnedItem*)base;
if(fromPlr->BackpackAddItem(obj->m_Item))
obj->setActiveFlag(0);
}
else if(base->Class->Name == "obj_DroppedItem")
{
if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return;
obj_DroppedItem* obj = (obj_DroppedItem*)base;
if(fromPlr->BackpackAddItem(obj->m_Item))
obj->setActiveFlag(0);
}
i can't find this part
 
Upvote 0
Newbie Spellweaver
Joined
Mar 1, 2019
Messages
21
Reaction score
0
if(base->Class->Name == "obj_SpawnedItem") {
if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return;
obj_SpawnedItem* obj = (obj_SpawnedItem*)base;
if(fromPlr->BackpackAddItem(obj->m_Item))
obj->setActiveFlag(0);
}
else if(base->Class->Name == "obj_DroppedItem")
{
if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return;
obj_DroppedItem* obj = (obj_DroppedItem*)base;
if(fromPlr->BackpackAddItem(obj->m_Item))
obj->setActiveFlag(0);
}
i can't find this part
 
Upvote 0
Junior Spellweaver
Joined
Jun 15, 2016
Messages
139
Reaction score
37
Use this part of the code if you do not want to pick up weapons when respawning

Not Pick Up items spawn

In ServerGameLogic.cpp
Search for:

Code:
if(base->Class->Name == "obj_SpawnedItem")
    {
        
        obj_SpawnedItem* obj = (obj_SpawnedItem*)base;
        if(fromPlr->BackpackAddItem(obj->m_Item))
            obj->setActiveFlag(0);
    }
    else if(base->Class->Name == "obj_DroppedItem")
    {
        
        obj_DroppedItem* obj = (obj_DroppedItem*)base;
        if(fromPlr->BackpackAddItem(obj->m_Item))
            obj->setActiveFlag(0);
    }[/COLOR]
[COLOR=#666666]Add lines in red[/COLOR]
[B][COLOR=#ff0000]Tested in src DOOMMMO[/COLOR]
Code:
if(base->Class->Name == "obj_SpawnedItem")
    {
        [COLOR=#ff0000]if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return;[/COLOR]
        obj_SpawnedItem* obj = (obj_SpawnedItem*)base;
        if(fromPlr->BackpackAddItem(obj->m_Item))
            obj->setActiveFlag(0);
    }
    else if(base->Class->Name == "obj_DroppedItem")
    {
        [COLOR=#ff0000]if (fromPlr->loadout_->GameFlags == wiCharDataFull::GAMEFLAG_SpawnProtection) return; [/COLOR]
        obj_DroppedItem* obj = (obj_DroppedItem*)base;
        if(fromPlr->BackpackAddItem(obj->m_Item))
            obj->setActiveFlag(0);
    }

[/B][/B][B][COLOR=#666666]
 
Upvote 0
Newbie Spellweaver
Joined
Mar 1, 2019
Messages
21
Reaction score
0
i still can take item when i have spawn protect :(
Fearofgodtr - [HELP]  Pick up and not pick up items spawn - RaGEZONE Forums
 
Upvote 0
Joined
Sep 3, 2013
Messages
903
Reaction score
227
Look here :

for(it=m_SharedUsableItemList.begin(); it!=m_SharedUsableItemList.end(); ++it)

CKCUhZY - [HELP]  Pick up and not pick up items spawn - RaGEZONE Forums

now is for dev hide , use for spawnproctetion , hide hud pickup
 

Attachments

You must be registered for see attachments list
Upvote 0
Back
Top