Warning: Using this on a BattlEye enabled server will get you globally banned. These scripts are detected. If you want to make sure not to get banned when using on a BattlEye enabled server, then create your own script! For now, go onto servers with BattlEye disabled!
Alright. Now that we have that out of the way, Hi. I'll be showing you how to create, inject and execute several scripts for Day Z. Use these at your own risk.
Day Z Ammo Crate
First, you want to navigate to your ArmA 2: Operation Arrowhead directory and create a folder there called "scripts". Inside here you want to make two files -
1. ammo.sqf
2. cargo.sqf
Once you have done that, edit ammo.sqf and put this code in:
Code:
_abox = "AmmoBoxBig" createVehicle (position player);
[_abox] execVM "\scripts\cargo.sqf";
Save and exit.
Now edit cargo.sqf and insert this code:
Code:
_abox = _this select 0;
_dayz_wep =["M14_EP1","Remington870_lamp","M4A3_CCO_EP1","M4A1_AIM_SD_camo","BAF_L85A2_RIS_CWS","BAF_AS50_scoped","Winchester1866","LeeEnfield","revolver_EP1","FN_FAL","FN_FAL_ANPVS4","m107_DZ",
"Mk_48_DZ","DMR","M16A2","M16A2GL","bizon_silenced","AK_74","M4A1_Aim","AKS_74_kobra","AKS_74_U","AK_47_M","M24","M1014","M4A1","MP5SD","MP5A5","huntingrifle","Crossbow","glock17_EP1","M9",
"M9SD","Colt1911","UZI_EP1","Binocular","Binocular_Vector","NVGoggles","ItemGPS","ItemMap","ItemCompass","ItemWatch","ItemFlashlight","ItemFlashlightRed","ItemKnife","ItemHatchet","ItemMatchbox",
"ItemEtool","ItemToolbox"];
_dayz_mag =["30Rnd_556x45_Stanag","30Rnd_556x45_StanagSD","20Rnd_762x51_DMR","30Rnd_762x39_AK47","5Rnd_762x51_M24","10Rnd_127x99_m107","8Rnd_B_Beneli_74Slug","1Rnd_HE_M203","FlareWhite_M203",
"FlareGreen_M203","1Rnd_Smoke_M203","200Rnd_556x45_M249","8Rnd_B_Beneli_Pellets","30Rnd_9x19_MP5","30Rnd_9x19_MP5SD","100Rnd_762x51_M240","15Rnd_W1866_Slug","5x_22_LR_17_HMR",
"10x_303","15Rnd_9x19_M9","15Rnd_9x19_M9SD","7Rnd_45ACP_1911","17Rnd_9x19_glock17","8Rnd_9x18_Makarov","6Rnd_45ACP","8Rnd_9x18_Makarov","BoltSteel","PipeBomb","HandGrenade_west",
"FoodSteakRaw","FoodSteakCooked","FoodCanBakedBeans","FoodCanSardines","FoodCanPasta","ItemSodaCoke","ItemSodaPepsi","ItemWaterbottle","HandRoadFlare","HandChemGreen","HandChemBlue",
"HandChemRed","ItemSandbag","ItemTankTrap","ItemWire","ItemBandage","ItemPainkiller","ItemMorphine","ItemEpinephrine","ItemAntibiotic","ItemBloodbag","ItemHeatPack","PartWoodPile","PartWheel",
"PartFueltank","PartGlass","PartEngine","PartGeneric","PartVRotor","ItemJerrycan","ItemGenerator","ItemTent","Skin_Soldier1_DZ","Skin_Survivor2_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"];
_dayz_bpk =["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_CivilBackpack_EP1","DZ_ALICE_Pack_EP1","DZ_Backpack_EP1"];
{_abox addWeaponCargo [_x,100];} forEach _dayz_wep;
{_abox addMagazineCargo [_x,100];} forEach _dayz_mag;
{_abox addBackpackCargo [_x,2];} forEach _dayz_bpk;
Save and exit.
All right, that's your scripts ready! Now you want to open up Cheat Engine and ArmA II: CO. At the main menu of ArmA II: CO, you want to go to cheat engine and find the process "arma2oa.exe". Once you have selected this, you want to change the value type to "Text" and search for:
private ["_dummy"]; _dummy = [_this,"onload"] execVM "\ca\ui\scripts\dedicatedServerInterface.sqf";
Once you find the value, double click it to add it to the window at the bottom and double click the value to edit it to:
private ["_dummy"]; _dummy = [_this,"onload"] execVM "\scripts\ammo.sqf";
Alright, done that? Lets get in game! Join a server and press Right Shift + P to bring up some server info. Close it and an ammo box should be relatively close to you (you may need to look around for it). Open it up and 100 of each weapon should be there, aswell as tools, ammo, food and bags.
Voila, you've spawned in weapons. Have fun!
Day Z Vehicle Spawn
Alright. This is pretty much the same as the Ammo Crate but with one, albeit bigger, script. You want to make a script in the "scripts" folder again and call it car.sqf or helicopter.sqf (depends on what you want to spawn.). Edit it and insert this script-
Code:
private["_spawn", "_dir", "_pos", "_xos", "_yos", "_zos", "_rid", "_svr"];
_spawn = "[INSERT VEHICLE HERE]";
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)-50*sin(_dir),(_pos select 1)-50*cos(_dir),0]; // 50 meters behind
_xos = _pos select 0;
_yos = _pos select 1;
_zos = _pos select 2;
_rid = 999+random(9999);
_svr = format["
if (isServer) then {
_object = createVehicle ['%1', [%2, %3, %4], [], 0, 'CAN_COLLIDE'];
_object setVariable ['ObjectID', %5, true];
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _object];
_uid = _object call dayz_objectUID;
_object setVariable ['ObjectUID', _uid, true];
_object setVariable ['OwnerID', 0, true];
}", _spawn, _xos, _yos, _zos, _rid];
sleep 0.1;
player setVehicleInit _svr;
sleep 0.1;
processInitCommands;
sleep 0.1;
clearVehicleInit player;
Edit the [INSERT VEHICLE HERE] part of the code with the class name of a vehicle. You can find a list of vehicles
here.
Now you want to edit this:
private ["_dummy"]; _dummy = [_this,"onload"] execVM "\ca\ui\scripts\dedicatedServerInterface.sqf";
with this:
private ["_dummy"]; _dummy = [_this,"onload"] execVM "\scripts\[nameofvehiclespawnscript].sqf";
again in cheat engine, replacing the name with whatever you called it. Head back in game and press Right Shift + P at the same time again and around 50 meters
behind you should spawn whatever vehicle you picked.
Well, that's the end of the tutorial! Hope it helped!