how to Create Custom Weapon box?(to add I made Example)

bok141

New Member
how to Create Custom Weapon box?(to add I made Example)
But Can't See go to Location In game
--------------------
private ["_currBox","_selectedBoxPos"];
_currBox = createVehicle ["RUBasicWeaponsBox", _selectedBoxPos, [], 30, "NONE"]
//_currBox = "RUBasicWeaponsBox" createVehicle (getPos spawnLogic);
_currBox setPos [10373.1,2234.46,0.031];
_currBox setDir 209;
// Clear prexisting weapons first
clearMagazineCargoGlobal _currBox;
clearWeaponCargoGlobal _currBox;
// Add new weapons before ammunition
_currBox addWeaponCargoGlobal ["Saiga12K",10];
_currBox addWeaponCargoGlobal ["M9",10];
_currBox addWeaponCargoGlobal ["MP5A5",2];
// Add ammunition
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_74Slug",50];
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_Pellets",50];
_currBox addMagazineCargoGlobal ["15Rnd_9x19_M9",50];
_currBox addMagazineCargoGlobal ["30Rnd_9x19_MP5",50];
----------- copy lines by Weastland 3.0 github and i edited
------------ line in misson's init.sqf file
[] execVM "filename.sqf";

Ask for advice please...
and sorry for my bad English!
 
Have you tried with a USbox instead ?

Code:
private ["_currBox","_selectedBoxPos","_mypos","_dir"];
 
_selectedBoxPos = "USBasicWeaponsBox";
_mypos = [10373.1,2234.46,0.031];
_dir = 209;
_currBox = createVehicle [_selectedBoxPos, _mypos, [], 0, "CAN_COLLIDE"];
_currBox setDir _dir;
_currBox setposATL _mypos;
clearWeaponCargoGlobal _currBox;
clearMagazineCargoGlobal _currBox;
clearBackpackCargoGlobal _currBox;
 
// Weapons
_currBox addWeaponCargoGlobal ["Saiga12K",10];
_currBox addWeaponCargoGlobal ["M9",10];
_currBox addWeaponCargoGlobal ["MP5A5",2];
 
// Ammo
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_74Slug",50];
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_Pellets",50];
_currBox addMagazineCargoGlobal ["15Rnd_9x19_M9",50];
_currBox addMagazineCargoGlobal ["30Rnd_9x19_MP5",50];


Also check your RPT log...maybe your server is deleting the box...if you are using the latest dayz addon.
Check your \dayz_server\system\server_cleanup.fsm
Search for the words Check for Ammobox and see if that whole if has either // infront of every line....or a "/*" \n above it.
look at mine that it is disabled:
/* code here */ <---- this will disabled the whole if statement.

"/*" \n
"//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
 
Try assigning it a blank objectUID like this:

Code:
_currBox setVariable ["ObjectID",""];

Without an ObjectID or ObjectUID, DayZ will not allow the object to be created. Assigning any value other than zero will allow it to remain.
 
Have you tried with a USbox instead ?

Code:
private ["_currBox","_selectedBoxPos","_mypos","_dir"];
 
_selectedBoxPos = "USBasicWeaponsBox";
_mypos = [10373.1,2234.46,0.031];
_dir = 209;
_currBox = createVehicle [_selectedBoxPos, _mypos, [], 0, "CAN_COLLIDE"];
_currBox setDir _dir;
_currBox setposATL _mypos;
clearWeaponCargoGlobal _currBox;
clearMagazineCargoGlobal _currBox;
clearBackpackCargoGlobal _currBox;
 
// Weapons
_currBox addWeaponCargoGlobal ["Saiga12K",10];
_currBox addWeaponCargoGlobal ["M9",10];
_currBox addWeaponCargoGlobal ["MP5A5",2];
 
// Ammo
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_74Slug",50];
_currBox addMagazineCargoGlobal ["8Rnd_B_Saiga12_Pellets",50];
_currBox addMagazineCargoGlobal ["15Rnd_9x19_M9",50];
_currBox addMagazineCargoGlobal ["30Rnd_9x19_MP5",50];


Also check your RPT log...maybe your server is deleting the box...if you are using the latest dayz addon.
Check your \dayz_server\system\server_cleanup.fsm
Search for the words Check for Ammobox and see if that whole if has either // infront of every line....or a "/*" \n above it.
look at mine that it is disabled:
/* code here */ <---- this will disabled the whole if statement.

"/*" \n
"//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

14:51:50 - Player #0 [player's name] (df9a20e4437a40129c58ed8a9395dcbc) has been kicked by BattlEye: CreateVehicle Restriction #2
this batttleye kick error..
how to..
 
Add in line 2 in your createvehicle.txt this at the end (might be line 1 though) : ->>> !="USBasicWeaponsBox"
 
Add in line 2 in your createvehicle.txt this at the end (might be line 1 though) : ->>> !="USBasicWeaponsBox"
this createvehicle.txt is correct?
1 "" !="UmbrellaCorp1_DZ" !="UmbrellaCorp2_DZ" !="WeaponHolder_ItemMachete" !="DZ_Czech_Vest_Puch" !="WeaponHolder_ItemCrowbar" !="DZ_TK_Assault_Pack_EP1" !="WeaponHolder_ItemTent" !="DZ_British_ACU" !="WoodenArrowF" !="Logic" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="zZombie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="Survivor1_DZ" !="Survivor2_DZ" !="Survivor3_DZ" !="SurvivorW2_DZ" !="Bandit1_DZ" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="Camo1_DZ" !="Soldier1_DZ" !="DZ_Backpack_EP1" !="Sniper1_DZ" !="DZ_Assault_Pack_EP1" !="BanditW1_DZ" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="_this spawn fnc_plyrHit;"
1 "SeaGull"
5 "box" !="USBasicWeaponsBox" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="BAF_ied_v1"
5 "BasicWeapons"
5 "SpecialWeapons"
this line to same..
5 "box" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="BAF_ied_v1" !="USBasicWeaponsBox"
battleye kick ;
i line 2 add !="USBasicWeaponsBox"
but if game connect then battleye kick.. #3
 
Try this: I just added it to line 4 as well.

Code:
1 "" !="UmbrellaCorp1_DZ" !="UmbrellaCorp2_DZ" !="WeaponHolder_ItemMachete" !="DZ_Czech_Vest_Puch" !="WeaponHolder_ItemCrowbar" !="DZ_TK_Assault_Pack_EP1" !="WeaponHolder_ItemTent" !="DZ_British_ACU" !="WoodenArrowF" !="Logic" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="zZombie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="Survivor1_DZ" !="Survivor2_DZ" !="Survivor3_DZ" !="SurvivorW2_DZ" !="Bandit1_DZ" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="Camo1_DZ" !="Soldier1_DZ" !="DZ_Backpack_EP1" !="Sniper1_DZ" !="DZ_Assault_Pack_EP1" !="BanditW1_DZ" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="_this spawn fnc_plyrHit;"
1 "SeaGull"
5 "box" !="USBasicWeaponsBox" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="BAF_ied_v1"
5 "BasicWeapons" !="USBasicWeaponsBox"
5 "SpecialWeapons"
 
Try this: I just added it to line 4 as well.

Code:
1 "" !="UmbrellaCorp1_DZ" !="UmbrellaCorp2_DZ" !="WeaponHolder_ItemMachete" !="DZ_Czech_Vest_Puch" !="WeaponHolder_ItemCrowbar" !="DZ_TK_Assault_Pack_EP1" !="WeaponHolder_ItemTent" !="DZ_British_ACU" !="WoodenArrowF" !="Logic" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="zZombie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="Survivor1_DZ" !="Survivor2_DZ" !="Survivor3_DZ" !="SurvivorW2_DZ" !="Bandit1_DZ" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="Camo1_DZ" !="Soldier1_DZ" !="DZ_Backpack_EP1" !="Sniper1_DZ" !="DZ_Assault_Pack_EP1" !="BanditW1_DZ" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="_this spawn fnc_plyrHit;"
1 "SeaGull"
5 "box" !="USBasicWeaponsBox" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="BAF_ied_v1"
5 "BasicWeapons" !="USBasicWeaponsBox"
5 "SpecialWeapons"

Thank To Your Answer
Good Work
But I have Write createvehicle.txt is Vary
Code:
1 "" !="USBasicWeaponsBox" !="UmbrellaCorp1_DZ" !="UmbrellaCorp2_DZ" !="WeaponHolder_ItemMachete" !="DZ_Czech_Vest_Puch" !="WeaponHolder_ItemCrowbar" !="DZ_TK_Assault_Pack_EP1" !="WeaponHolder_ItemTent" !="DZ_British_ACU" !="WoodenArrowF" !="Logic" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat" !="WildBoar" !="Sheep" !="Hen" !="Cow01" !="Cow02" !="Cow03" !="Cow04" !="zZombie_Base" !="z_hunter" !="z_teacher" !="z_doctor" !="z_suit1" !="z_suit2" !="z_worker1" !="z_worker2" !="z_worker3" !="z_villager1" !="z_villager2" !="z_villager3" !="z_soldier" !="z_soldier_heavy" !="z_soldier_pilot" !="z_policeman" !="z_priest" !="BoltSteelF" !="Land_Fire_DZ" !="SodaCan" !="JackDaniels" !="RoadFlare" !="ChemRed" !="ChemBlue" !="ChemGreen" !="Survivor1_DZ" !="Survivor2_DZ" !="Survivor3_DZ" !="SurvivorW2_DZ" !="Bandit1_DZ" !="CZ_VestPouch_EP1" !="DZ_Patrol_Pack_EP1" !="DZ_CivilBackpack_EP1" !="DZ_ALICE_Pack_EP1" !="SmokeShell" !="SmokeShellRed" !="SmokeShellGreen" !="MedBox0" !="Camo1_DZ" !="Soldier1_DZ" !="DZ_Backpack_EP1" !="Sniper1_DZ" !="DZ_Assault_Pack_EP1" !="BanditW1_DZ" !="G_40mm_HE" !="dog" !="WeaponHolder_MeleeCrowbar" !="WeaponHolder_ItemHatchet" !="WeaponHolder_PartGeneric" !="WeaponHolder_ItemJerrycan" !="WeaponHolder_PartFueltank" !="WeaponHolder_PartGlass" !="WeaponHolder_PartEngine" !="WeaponHolder_PartWheel" !="WeaponHolder_PartVRotor" !="_this spawn fnc_plyrHit;"
1 "SeaGull"
5 "box" !="USBasicWeaponsBox" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !="CardBoardBox" !="FoodBox1" !="FoodBox2" !="FoodBox3" !="BAF_ied_v1"
5 "BasicWeapons" !="USBasicWeaponsBox"
5 "SpecialWeapons"
Your createvehicle.txt info Write use battleye kick.. TAT
 
Back
Top