Medical and Food Boxes Disappearing

ThreePlus

Member
Hello.

When I try to add Medical, Food and Ammo Boxes to my map they stay for a short time then disappear. Anyone know why this might be happening?
 
not wokring
I made like this
"//Check for Ammobox" \n
"// {" \n
"// if(!(_x isKindOf ""WeaponHolder"")) then {" \n
"// diag_log (""CLEANUP: DELETING AN AMMOBOX "" + (typeOf _x));" \n
"// deleteVehicle _x;" \n
"// };" \n
"// } forEach allMissionObjects ""ReammoBox"";" \n
"//" \n
"//" \n
 
there must be sth else

Spawn them via an sqf and use something like
Code:
    _dir = getdir player;
        _pos = getPos player;
        _pos = [(_pos select 0)+8*sin(_dir),(_pos select 1)+8*cos(_dir),0];
        _box = "USBasicAmmunitionBox" createVehicle _pos;
        clearWeaponCargoGlobal _box;
        clearmagazinecargoGlobal _box;
 
        {_box addMagazineCargoGlobal [_x, 30];} forEach ["ItemWoodWallGarageDoor","ItemWoodWallGarageDoorLocked",
        "ItemWoodFloorHalf","ItemWoodWallDoorLg","ItemWoodWallWithDoorLgLocked","ItemWoodWallLg",
        "ItemWoodWallWindowLg","ItemWoodFloorQuarter","ItemWoodWallDoor","ItemWoodWallWithDoorLocked",
        "ItemWoodWall","ItemWoodWallWindow","ItemWoodWallThird","ItemWoodLadder","ItemWoodFloor","ItemWoodStairs",
        "ItemWoodStairsSupport","ItemWoodStairsSupports","ItemTentDomed2","ItemTentDomed","ItemTent","ItemTankTrap",
        "ItemSandbagLarge","ItemSandbag","ItemPole","ItemCorrugated","ItemCanvas","ItemBurlap","PartWoodLumber",
        "PartWoodPlywood","bulk_empty","wooden_shed_kit","wood_shack_kit","workbench_kit","stick_fence_kit",
        "sandbag_nest_kit","sun_shade_kit","rusty_gate_kit","outhouse_kit","storage_shed_kit","light_pole_kit",
        "ItemLightBulb","desert_net_kit","forest_net_kit","desert_large_net_kit","forest_large_net_kit","deer_stand_kit",
        "metal_panel_kit","ItemToolbox","ItemEtool","ItemComboLock","ItemVault","metal_floor_kit","CinderWallDoorway_DZ",
        "CinderWallDoorway_DZ","CinderWallHalf_DZ","CinderBlocks","MortarBucket"];
        {_box addWeaponCargoGlobal [_x, 5];} forEach ["ItemKeyKit"];

That's what I use for an epoch building crate

now for the fsm, at the bottom of this .sqf you would do something like _box setVariable ["Sarge",1,true]; then in your fsm make an 'addition' to your deletion line and have this somewhere attached to it && (vehicle _x getVariable [""Sarge"",0] != 1)

but since Sarge is not ours to use, personalize it. Name it after your dog, do whatever ^.^
 
guess its just neccessary to change these lines in owcleanup
//Server Cleanup
_missionObjs = allMissionObjects "ReammoBox";
_qty = count _missionObjs;
{
if ((local _x) or (_qty > 750)) then {
_keep = _x getVariable ["permaLoot",false];
_nearby = {isPlayer _x} count (_x nearEntities [["CAManBase"], 100]);
if ( (!_keep) && (_nearby==0) ) then {
deleteVehicle _x;
_x = nil;
};
};
} forEach _missionObjs;
};
 
I changed it to this
//Server Cleanup
_missionObjs = allMissionObjects "";
_qty = count _missionObjs;
{
if ((local _x) or (_qty > 750)) then {
_keep = _x getVariable ["permaLoot",false];
_nearby = {isPlayer _x} count (_x nearEntities [["CAManBase"], 100]);
if ( (!_keep) && (_nearby==0) ) then {
deleteVehicle _x;
_x = nil;
};
};
} forEach _missionObjs;
};
fucks up the entire server, player reportet me that : after X min (where usally the boxes gets deletet (kind of 5min) the cars where there were in got deltet and the custom building I placed with the editor, maybe more but didnt notice yet, also if you log into the server after this 5min passed, you'll get stuck at blackscreen / debug
this issues happen when I change the Server Cleanup like I posted
 
I changed it to this
//Server Cleanup
_missionObjs = allMissionObjects "";
_qty = count _missionObjs;
{
if ((local _x) or (_qty > 750)) then {
_keep = _x getVariable ["permaLoot",false];
_nearby = {isPlayer _x} count (_x nearEntities [["CAManBase"], 100]);
if ( (!_keep) && (_nearby==0) ) then {
deleteVehicle _x;
_x = nil;
};
};
} forEach _missionObjs;
};
fucks up the entire server, player reportet me that : after X min (where usally the boxes gets deletet (kind of 5min) the cars where there were in got deltet and the custom building I placed with the editor, maybe more but didnt notice yet, also if you log into the server after this 5min passed, you'll get stuck at blackscreen / debug
this issues happen when I change the Server Cleanup like I posted

In the box.sqf or whatever you are using, use _box setVariable ["permaLoot",1,"true"]; or something along those lines, since it is already checking for permaloot.
 
Back
Top