Ammo crates spawn problem

SirBlastelot

New Member
At certain locations on our server we are spawning ammo crates and random stuff for players to find.
But if i look at the .RPT file, everything is moved to a random location and made empty.
If tryed everything and im stuck at the moment.

This is what i already had scripted in.

USVehicleBox_EP1
USBasicAmmunitionBox_EP1
USBasicWeapons_EP1
USLaunchers_EP1
USOrdnanceBox_EP1
USSpecialWeapons_EP1
MedBox1
WeaponHolder_ItemToolbox

I did it following this:
http://www.dayzpatriots.com/adding-weapon-ammo-crates-1-7-7-1-t97.html

Our server is a Dayz Chernarus 1.8.0.3

This is what my .RPT gives.
2ij3ksz.jpg


I would be thankfull if someone could help me out.

I'm also available at the following TS server.
94.208.198.227:9990
 
Sorry just noticed you placed the same link i used. As i said though, i used the 3d editor to place them and they seem to be staying put. I'd give that a try before trying to edit down your files again.
 
Did you also edit this?

Code:
Then Server/system/server_cleanup.fsm

And find this line:

Code:
"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


And make it look like this;

Code:
"//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

My idea is deleting them after 20 min... so theres a limited time to reach them.
 
I actually did not have all of that code which seemed strange to me. May have been a 1.7 string of code. I only commented out this
Code:
name = "cleanup_objects";
      //init = /*%FSM<STATEINIT""">*/"_missionObjs =  allMissionObjects ""ReammoBox"";" \n
       "//_qty = count _missionObjs;" \n
       ""// \n
       "diag_log (""CLEANUP:TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
       "" \n
       "_dateNow = (DateToNumber date);" \n
       "_delQty = 0;" \n
       "{" \n
 
Yeah id try to spawn them in via the mission editor and see if that works. Takes only a couple of minutes to do. Its at least worth the troubleshoot time.
 
I already did that, i have it all setup at Green Mountain.
Database works fine.
They spawn at the location given in the database, but they just move when server starts.
So maybe its my server cleanup acting up.
So ill give that a try :)
 
Still the same problem.
Dont know what's wrong... i followed that tutorial.
I added the boxes in the editor and then added them to the database with the cords given by the editor.

I'm stuck, they keep moving to the middle of the map empty.
 
The moving can it have something to do with the world space?

This is the world space of my first crate.
[113.03,[3726.67,5967.05]]
 
We got it working, moving problem is fixed.
But they still spawn empty, is there a way to keep the gear that's standard in the caches?
 
We got it working, moving problem is fixed.
But they still spawn empty, is there a way to keep the gear that's standard in the caches?
Sir if you open your dayz_server\init\cleanup.sqf search for something simular to this
{
if (((count ((getWeaponCargo _x) select 1))+(count ((getMagazineCargo _x) select 1))) > 300) then {
clearVehicleInit _x;
deleteVehicle _x;
_x = nil;
};
} forEach allMissionObjects "All";
Typically the "select 1))) > 300)" " would look like select 1))) > 80) " i increased mine to 300 so that i can hold more loot in my custom crates. Also if you want to make a crate Perm just add this below the
_this setPos [6660.3984, 14177.261];
Add this line below setPos
_this setVariable ["permaLoot",true,true];
just so i am being clear i will show an example of my crates
if (isServer) then {
//LeftBarn
_vehicle_3 = objNull;
if (true) then
{
_this = createVehicle ["USSpecialWeapons_EP1", [3991.1807, 7799.77, 0], [], 0, "CAN_COLLIDE"];
_vehicle_3 = _this;
_this setDir -182.5;
//Clear Cargo
clearweaponcargoGlobal _this;
clearmagazinecargoGlobal _this;
//Add Cargo
_this addWeaponCargoGlobal ["SCAR_L_CQC_CCO_SD",2];
_this addWeaponCargoGlobal ["SCAR_H_LNG_Sniper",2];

//Add Mags
_this addmagazineCargoGlobal ["20rnd_762x51_B_SCAR",20];
_this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",20];
_this addbackpackCargoGlobal ["DZ_Backpack_EP1",2];
//Position
_this setPos [6660.3984, 14177.261];
_this setVariable ["permaLoot",true,true];
};
I know i got abit off topic but i hope this helps, most of the time ppl will try to add custom variables that isnt needed. Also you can exe the above crate by placing [] execVM "xxxx.sqf"; in ur dayz_x.xxxxxx\init.sqf
or
call compile preProcessFileLineNumbers"xxx\xxx.sqf"; in dayz_server\xxx\xxx
 
Last edited:
Back
Top