Hello friends,someone how to block item drop from inventory a one map? I USE DOOM MMO V3.![]()
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:
Replace with this:DROPPED_ITEM_EXPIRE_TIME
I do not know if it works, but it never hurts to tryif(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;
}
in:
NOMEDOMAPA = map name you want.
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
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
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:
HOW TO FIX THIS?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