[help] no-drop items inventory

Results 1 to 6 of 6
  1. #1
    Enthusiast Vitor Zaions is offline
    MemberRank
    Oct 2013 Join Date
    38Posts

    shout [help] no-drop items inventory

    Hello friends,someone how to block item drop from inventory a one map? I USE DOOM MMO V3.


  2. #2
    Member doouglasgfx is offline
    MemberRank
    Apr 2013 Join Date
    ColoradoLocation
    94Posts

    Re: [help] no-drop items inventory

    Quote Originally Posted by Vitor Zaions View Post
    Hello friends,someone how to block item drop from inventory a one map? I USE DOOM MMO V3.
    I do not know if will work but try it.

    find in warz_server,snl:

    DROPPED_ITEM_EXPIRE_TIME
    Replace with this:

    if(loadout_->GameMapId != GBGameInfo::MAPID_NOMEDOMAPA){
    const float DROPPED_ITEM_EXPIRE_TIME = 0.0f * 60.0f;
    } else {
    const float DROPPED_ITEM_EXPIRE_TIME = 30.0f * 60.0f;
    }
    I do not know if it works, but it never hurts to try
    in:
    NOMEDOMAPA = map name you want.

  3. #3
    Enthusiast Vitor Zaions is offline
    MemberRank
    Oct 2013 Join Date
    38Posts

    Re: [help] no-drop items inventory

    Error 1 error C2059: syntax error : 'if' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 20 WarZ Game Server
    Error 2 error C2059: syntax error : ')' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 20 WarZ Game Server
    Error 3 error C2143: syntax error : missing ';' before '{' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 20 WarZ Game Server
    Error 4 error C2447: '{' : missing function header (old-style formal list?) c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 20 WarZ Game Server
    Error 5 error C2059: syntax error : 'else' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 22 WarZ Game Server
    Error 6 error C2143: syntax error : missing ';' before '{' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 22 WarZ Game Server
    Error 7 error C2447: '{' : missing function header (old-style formal list?) c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 22 WarZ Game Server
    Error 8 error C2065: 'DROPPED_ITEM_EXPIRE_TIME' : undeclared identifier c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 31 WarZ Game Server

  4. #4
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [help] no-drop items inventory

    better would be:

    Code:
    float DROPPED_ITEM_EXPIRE_TIME = 30.0f * 60.0f;
    if(loadout_->GameMapId != GBGameInfo::MAPID_NOMEDOMAPA){
    DROPPED_ITEM_EXPIRE_TIME = 0.0f * 60.0f;
    }

  5. #5
    Enthusiast Vitor Zaions is offline
    MemberRank
    Oct 2013 Join Date
    38Posts

    Re: [help] no-drop items inventory

    Quote Originally Posted by GigaToni View Post
    better would be:

    Code:
    float DROPPED_ITEM_EXPIRE_TIME = 30.0f * 60.0f;
    if(loadout_->GameMapId != GBGameInfo::MAPID_NOMEDOMAPA){
    DROPPED_ITEM_EXPIRE_TIME = 0.0f * 60.0f;
    }
    Gigatoni I add this:

    const float DROPPED_ITEM_EXPIRE_TIME = 10.0f * 60.0f;
    if(loadout_->GameMapId != GBGameInfo::MAPID_WZ_Caliwood){
    const float DROPPED_ITEM_EXPIRE_TIME = 0.0f * 60.0f;
    }

    And received this errors:


    Error 1 error C2059: syntax error : 'if' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 21 WarZ Game Server
    Error 2 error C2143: syntax error : missing ';' before '{' c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 21 WarZ Game Server
    Error 3 error C2447: '{' : missing function header (old-style formal list?) c:\WarZ\server\src\WO_GameServer\Sources\ObjectsCode\sobj_DroppedItem.cpp 21 WarZ Game Server

  6. #6
    Enthusiast Vitor Zaions is offline
    MemberRank
    Oct 2013 Join Date
    38Posts

    [help] block change backpack in map

    hello friends, I am trying to block the change in backpack on a map the code ( find in AI_PLAYER.CPP ) I am using is this :


    bool obj_Player::ChangeBackpack(int slotFrom)
    {
    if ( gClientLogic().m_gameInfo.mapId != 5 )
    {
    wiCharDataFull& slot = CurLoadout;

    const BackpackConfig* cfg = g_pWeaponArmory->getBackpackConfig(slot.Items[slotFrom].itemID);
    if(!cfg) {
    return false;
    }

    // do not allow to change backpack if new backpack has less slots then current one (to prevent hack when player can drop 300+ chemlights and cause other clients to freeze
    {
    int numItemsCurrently = 0;
    for (int a = 0; a < slot.BackpackSize; a++)
    {
    if (slot.Items[a].itemID != 0)
    numItemsCurrently++;
    }

    if(numItemsCurrently > cfg->m_maxSlots)
    {
    return false;
    }
    }

    PKT_C2S_PlayerChangeBackpack_s n;
    n.SlotFrom = slotFrom;
    n.BackpackSize = cfg->m_maxSlots;
    p2pSendToHost(gClientLogic().localPlayer_, &n, sizeof(n));

    // replace backpack in used slot with current one (SERVER CODE SYNC POINT)
    slot.Items[slotFrom].itemID = slot.BackpackID;

    // change it
    slot.BackpackID = cfg->m_itemID;
    slot.BackpackSize = cfg->m_maxSlots;
    UpdateLoadoutSlot(slot, slotFrom);
    else
    {
    Scaleform::GFx::Value var[3];
    var[0].SetString("Cant drop item in PvP PvP survivalzombiemmmo");
    var[1].SetBoolean(true);
    var[2].SetString("");
    gfxMovie.Invoke("_root.api.showInfoMsg", var, 3);
    }
    }
    return true;
    }


    AND RECEIVED THIS ERROR'S:

    Error 1 error C2181: illegal else without matching if c:\WarZ\src\EclipseStudio\Sources\ObjectsCode\AI\AI_Player.CPP 764 Eclipse StudioError 2 error C2065: 'gfxMovie' : undeclared identifier c:\WarZ\src\EclipseStudio\Sources\ObjectsCode\AI\AI_Player.CPP 770 Eclipse Studio
    Error 3 error C2228: left of '.Invoke' must have class/struct/union c:\WarZ\src\EclipseStudio\Sources\ObjectsCode\AI\AI_Player.CPP 770 Eclipse Studio
    HOW TO FIX THIS?



Advertisement