Basic Day Z Food Box (First Script)

Posts 1–15 of 26 · Page 1 of 2
Basic Day Z Food Box (First Script)
Hi everyone, this is my first script for Day Z; however I haven't tested it out because I don't have a working injector or bypass, this is my first script so if you see any errors in it please tell me. It gives you food and a coyote backpack.
_className = "USBasicItemsBox";
_mypos = getposATL player;
_dir = getdir player;
_mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];
_magicbox = createVehicle [_className, _mypos, [], 0, "CAN_COLLIDE"];
_magicbox setDir _dir;
_magicbox setposATL _mypos;

_items = [
"FoodSteakCooked",
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanPasta",
"ItemSodaCoke",
"ItemSodaPepsi",
"ItemWaterbottle",
];

_backpack = [
"DZ_Backpack_EP1"
];

clearitemsCargoGlobal _magicbox;
clearBackpackCargoGlobal _magicbox;

{_magicbox additemsCargoGlobal [_x, 50];} forEach _items;
{_magicbox addBackpackCargoGlobal [_x, 1];} forEach _backpack;

sleep 90;
deleteVehicle _magicbox;
if (true) exitWith {};
Been posted many times.
Quote Originally Posted by RyanH100 View Post
Been posted many times.
Don't put him down like that!

Not bad for first script, that was also my first one! hehe (:
Yeah, Dont put him down as quickly as that, i see you in other posts, oh this has been posted before or whatever, it's not very nice even if you're correct
Quote Originally Posted by Aristesia View Post
Don't put him down like that!

Not bad for first script, that was also my first one! hehe (:
Thanks, currently I'm trying to make a more advanced one; I might even make one that spawns vehicles in the future, I just wish I had a working bypass.
Quote Originally Posted by Jim Morrison View Post
Thanks, currently I'm trying to make a more advanced one; I might even make one that spawns vehicles in the future, I just wish I had a working bypass.
I just wish I knew who sold one...

Hehehe!
You can find websites... That cant be named on the forums that sell the :O... also there are people who sell the bypasses on the forum (i wouldn't trust them) if you wana know some places to buy some good ones pm me
Where have you learned how to make this?
Quote Originally Posted by Gray View Post
Where have you learned how to make this?
A friend of mine taught me some basics, I couldn't find any good tutorials online.
Quote Originally Posted by Jim Morrison View Post
A friend of mine taught me some basics, I couldn't find any good tutorials online.
I've also looked all over but I have literally no idea on how to do anything like this.
I've never ever constructed a hack, but I'd really like to do it.

On a scale of 1 to 10, how hard was it? (Taking into consideration of what you know, are you good at coding or do you only have general understanding?)
Quote Originally Posted by Gray View Post
I've also looked all over but I have literally no idea on how to do anything like this.
I've never ever constructed a hack, but I'd really like to do it.

On a scale of 1 to 10, how hard was it? (Taking into consideration of what you know, are you good at coding or do you only have general understanding?)
Well Arma using it's own coding language unlike Java, C++, C#. My friend gave me some basic source code then he said make the code spawn, this, this, and this. Personally it wasn't that hard you just have to make sure that if you change a part of it, that it doesn't effect the other parts; you also need all the class names which are found here on MPGH, so I would rate it maybe 3.
Quote Originally Posted by Jim Morrison View Post
Well Arma using it's own coding language unlike Java, C++, C#. My friend gave me some basic source code then he said make the code spawn, this, this, and this. Personally it wasn't that hard you just have to make sure that if you change a part of it, that it doesn't effect the other parts; you also need all the class names which are found here on MPGH, so I would rate it maybe 3.
So a simple code to do something would look like what?
Quote Originally Posted by Gray View Post
So a simple code to do something would look like what?
Well this code is pretty simple, it just spawns a box near the player with food and a coyote backpack so this is a simple script:
_className = "USBasicItemsBox";
_mypos = getposATL player;
_dir = getdir player;
_mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];
_magicbox = createVehicle [_className, _mypos, [], 0, "CAN_COLLIDE"];
_magicbox setDir _dir;
_magicbox setposATL _mypos;

_items = [
"FoodSteakCooked",
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanPasta",
"ItemSodaCoke",
"ItemSodaPepsi",
"ItemWaterbottle",
];

_backpack = [
"DZ_Backpack_EP1"
];

clearitemsCargoGlobal _magicbox;
clearBackpackCargoGlobal _magicbox;

{_magicbox additemsCargoGlobal [_x, 50];} forEach _items;
{_magicbox addBackpackCargoGlobal [_x, 1];} forEach _backpack;

sleep 90;
deleteVehicle _magicbox;
if (true) exitWith {};
Good start man You planning to learn C++ and make more advanced stuff?
Quote Originally Posted by fragrantparrot View Post
Good start man You planning to learn C++ and make more advanced stuff?
Maybe over the summer, I got school work currently.
Posts 1–15 of 26 · Page 1 of 2

Post a Reply

Similar Threads

Talk with us