Munkeskov Posted November 11, 2014 Report Share Posted November 11, 2014 Hi guys, please help me, before i loose the rest of my hair :-/ I have a server running the old version of wai, and i like it, and i am trying to place some static boxes with loot. I have 5 places, and the boxes are there, and the content of only one is correct, but in the rest, there is 50 m240 and 50 m249 mags My staticAmmoBoxes.sqf is like: add custom ammo boxes below this line */ _box = createVehicle ["BAF_VehicleBox",[13110.2,18442.3,0.01], [], 0, "CAN_COLLIDE"]; [_box] call Large_Gun_Box; _box = createVehicle ["BAF_VehicleBox",[13004,19483,0.01], [], 0, "CAN_COLLIDE"]; [_box] call Static_02_Box; _box = createVehicle ["RUVehicleBox",[13526,19464,0.01], [], 0, "CAN_COLLIDE"]; [_box] call Static_03_Box; _box = createVehicle ["RUVehicleBox",[13285,20035,0.01], [], 0, "CAN_COLLIDE"]; [_box] call Static_04_Box; _box = createVehicle ["RUVehicleBox",[11408,18532,0.01], [], 0, "CAN_COLLIDE"]; [_box] call Explosive_Box; /* It is the last box witch is correct... The boxes is correctly added to missionIni.sqf All the classnames are checked multible times, and are correct... I have seen that the second box has to be named _box2, but that didnt help. this is a part of my static_02_Box file: //Static Box 02 _box = _this select 0; _box setVariable ["ObjectID","1",true]; _box setVariable ["permaLoot",true]; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_box]; clearWeaponCargoGlobal _box; clearMagazineCargoGlobal _box; // RIFLES _box addWeaponCargoGlobal ["Igla", 1]; _box addWeaponCargoGlobal ["Javelin", 1]; _box addWeaponCargoGlobal ["Stinger", 1]; _box addWeaponCargoGlobal ["Strela", 1]; // PISTOLS _box addWeaponCargoGlobal ["M9", 1]; _box addWeaponCargoGlobal ["M9SD", 1]; _box addWeaponCargoGlobal ["UZI_SD_EP1", 1]; // AMMUNITION _box addMagazineCargoGlobal ["Igla", 4]; _box addMagazineCargoGlobal ["Javelin", 4]; _box addMagazineCargoGlobal ["Stinger", 4]; _box addMagazineCargoGlobal ["Strela", 4]; _box addMagazineCargoGlobal ["100Rnd_127x99_M2", 4]; _box addMagazineCargoGlobal ["150Rnd_127x107_DSHKM", 4]; _box addMagazineCargoGlobal ["150Rnd_127x108_KORD", 4]; _box addMagazineCargoGlobal ["2000Rnd_762x51_M134", 4]; _box addMagazineCargoGlobal ["29Rnd_30mm_AGS30", 4]; // ITEMS _box addWeaponCargoGlobal ["Binocular_Vector", 2]; _box addWeaponCargoGlobal ["NVGoggles", 2]; _box addWeaponCargoGlobal ["GPS", 2]; //BACKPACKS _box addBackpackCargoGlobal ['DZ_LargeGunBag_EP1', 2]; // CLOTHING _box addMagazineCargoGlobal ["Drake", 2]; anybody??? Link to comment Share on other sites More sharing options...
0 McKeighan Posted November 11, 2014 Report Share Posted November 11, 2014 Perhaps this is the problem. _box addBackpackCargoGlobal ['DZ_LargeGunBag_EP1', 2]; That should be a double quote around the DZ_LargeGunBag_EP1, not a single. The reason you're getting 50 mags of m240 and 50 mags of m249 is because the box can't be loaded in completion, so it fails, and reverts back to it's origional contents before the clearWeaponCargoGlobal _box; clearMagazineCargoGlobal _box; part is done. (or it never gets this far in the call... same result. take your pick of explanation :) ) Link to comment Share on other sites More sharing options...
0 Munkeskov Posted November 12, 2014 Author Report Share Posted November 12, 2014 Thanks, i tried this, but without luck, but it seems to be some sort off random problem, because i got 4 out of 5 working, and then i just made a copy of one of the working boxes, and renamed it to the one that didnt worked, and then only 2 boxes worked... I will try and to make it work later on, because i really dont like to have seome unresolved problems on my server.... Link to comment Share on other sites More sharing options...
0 McKeighan Posted November 12, 2014 Report Share Posted November 12, 2014 Are you using the same SQF to load all 5 boxes? If so, you probably need to use _box1,_box2,_box3,_box4,_box5 or something of the sort. It'll get confused calling the same _box and result in unpredictable behavior. Link to comment Share on other sites More sharing options...
0 MrEnzO Posted November 13, 2014 Report Share Posted November 13, 2014 This are mine: //* Breaks Server If To Much Is Added To The Crate *\\ //* Anything More Can Cause Server To Crash *\\ //* Max Weapons = 100 * Max Mags = 520 * Max Bag = 1 *\\ if (isServer) then { _vehicle_100 = objNull; if (true) then { _this = createVehicle ["SpecialWeaponsBox", [12627.965, 10955.087, -1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_100 = _this; _this setDir 20; _this setVariable ["permaLoot",true]; clearWeaponCargoGlobal _this; clearMagazineCargoGlobal _this; _this addMagazineCargoGlobal ["ItemBriefcase100oz",2]; _this addMagazineCargoGlobal ["ItemVault",1]; _this addMagazineCargoGlobal ["30m_plot_kit",2]; _this addMagazineCargoGlobal ["PartWoodPlywood",10]; _this addMagazineCargoGlobal ["ItemWire",10]; _this addMagazineCargoGlobal ["ItemCorrugated",10]; _this addMagazineCargoGlobal ["ItemGenerator",2]; _this addMagazineCargoGlobal ["ItemSandbag",10]; _this addMagazineCargoGlobal ["ItemTent",3]; _this addMagazineCargoGlobal ["ItemTankTrap",5]; _this addMagazineCargoGlobal ["ItemPole",5]; _this addMagazineCargoGlobal ["ItemLightBulb",5]; _this addMagazineCargoGlobal ["PartGeneric",4]; _this addMagazineCargoGlobal ["PartGlass",10]; _this addMagazineCargoGlobal ["PartEngine",2]; _this addMagazineCargoGlobal ["PartWheel",4]; _this addMagazineCargoGlobal ["PartVRotor",1]; _this addMagazineCargoGlobal ["PartFueltank",2]; _this addMagazineCargoGlobal ["ItemJerrycan",3]; _this addMagazineCargoGlobal ["ItemTentDomed2",2]; }; _vehicle_101 = objNull; if (true) then { _this = createVehicle ["SpecialWeaponsBox", [12574.9, 11009.1, 0.023], [], 0, "CAN_COLLIDE"]; _vehicle_101 = _this; _this setDir 20; _this setVariable ["permaLoot",true]; clearWeaponCargoGlobal _this; clearMagazineCargoGlobal _this; _this addMagazineCargoGlobal ["ItemBriefcase100oz",1]; _this addMagazineCargoGlobal ["ItemVault",1]; _this addMagazineCargoGlobal ["bulk_ItemSandbag",2]; _this addMagazineCargoGlobal ["10Rnd_127x99_m107",5]; _this addWeaponCargoGlobal ["Mk_48_DZ",3]; _this addWeaponCargoGlobal ["VSS_vintorez",3]; _this addWeaponCargoGlobal ["Binocular_Vector",4]; _this addMagazineCargoGlobal ["bulk_30Rnd_556x45",2]; _this addMagazineCargoGlobal ["20Rnd_9x39_SP5_VSS",12]; _this addMagazineCargoGlobal ["100Rnd_762x51",9]; }; }; And I have learn this goes for the boxes //* Breaks Server If To Much Is Added To The Crate *\\ //* Anything More Can Cause Server To Crash *\\ //* Max Weapons = 100 * Max Mags = 520 * Max Bag = 1 *\\ per box. Link to comment Share on other sites More sharing options...
0 Munkeskov Posted November 14, 2014 Author Report Share Posted November 14, 2014 @ MrEnzO is this the only file you have, so you just call tis sqf file, and that is it? Link to comment Share on other sites More sharing options...
0 MrEnzO Posted November 14, 2014 Report Share Posted November 14, 2014 @ MrEnzO is this the only file you have, so you just call tis sqf file, and that is it? Jupp, I called the from the WAI's init.sqf with. ExecVM "\z\addons\dayz_server\WAI\boxes.sqf"; Link to comment Share on other sites More sharing options...
0 RussianCaliber Posted November 14, 2014 Report Share Posted November 14, 2014 Hey, quick question any idea why the static box fly's up in the air? Any fix to tell the box not to move at all? :D Link to comment Share on other sites More sharing options...
0 Munkeskov Posted November 15, 2014 Author Report Share Posted November 15, 2014 Jupp, I called the from the WAI's init.sqf with.ExecVM "\z\addons\dayz_server\WAI\boxes.sqf"; Works perfect, so much more simple than my other setup, with a file for each box, and a .sqf for calling them. Thanks! Link to comment Share on other sites More sharing options...
0 Munkeskov Posted November 15, 2014 Author Report Share Posted November 15, 2014 Hey, quick question any idea why the static box fly's up in the air? Any fix to tell the box not to move at all? :D The only thing that comes to my mind, is to make sure that Z coord (the last one) is close to zero. I allways put 0.01 in my Z. Link to comment Share on other sites More sharing options...
Question
Munkeskov
Hi guys, please help me, before i loose the rest of my hair :-/
I have a server running the old version of wai, and i like it, and i am trying to place some static boxes with loot.
I have 5 places, and the boxes are there, and the content of only one is correct, but in the rest, there is 50 m240 and 50 m249 mags
My staticAmmoBoxes.sqf is like:
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now