PostDayZ Scripting [Ongoing/Being Updated]

Posts 1–15 of 16 · Page 1 of 2
DayZ Scripting [Ongoing/Being Updated]
DayZ Scripting Tutorial

Requirements ... Bypass ... DayZ ... And yeah a menu to test it with

To Start off all scripts are written in the ArmA 2 Coding format so there is no GNU Editor to help you with this. I would Suggest using Notepad++ For windows or GEdit for Linux (who would be here with a linux os?). Scripting in DayZ is basically trial and error. these next few codes will teach you the fundamentals of coding sqf files.

To Start Off Lets Make a Simple Teleport Script (this file is attached)
Code:
player addWeapon 'ItemMap';
abcd=
{
	_pos = [_this select 0, _this select 1, _this select 2];
	(vehicle player) setpos [_pos select 0, _pos select 1, 0];
	player setVariable["lastPos",1];player setVariable["lastPos",[]];
	onMapSingleClick "";
	openMap [false, false];
};
openMap [true, false];
onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call abcd";

Now lets break it apart :

This spawns a map in the players Inventory
Code:
player addWeapon 'ItemMap';
This is the code that is run while the teleport is being executed
Code:
abcd=
{

        //This Represents a Location it will be used to teleport the player
	_pos = [_this select 0, _this select 1, _this select 2];

        //this changes the players location to the position above ^^^ (Format [X,Y,Z])
	(vehicle player) setpos [_pos select 0, _pos select 1, 0];

        //This changes the players last position to null so you are not detected
	player setVariable["lastPos",1];player setVariable["lastPos",[]];

        //clears the on map single click
	onMapSingleClick "";

        //Closes the map ([False, False] Closes)
	openMap [false, false];

};
this is the part that opens the map and executes the teleport
Code:
//Opens the map ([True, False] Opens)
openMap [true, false];

//When the map is single clicked it will do this

//Important : Call abcd runs that script before the teleport is executed
onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call abcd";
Uploaded By Other User:
Quote Originally Posted by typh0 View Post
Quick Player Heal

Code:
player setdammage 0;
http://community.bistudio.com/wiki/setDammage

Player - This is your current player, can also be subsituted for "This"
setdammage - Note the shitty spelling but as it says in wiki, they introduced setdamage to fix the spelling mistake but its interchangeable.
0 - Is of type "Number". 0 being not damaged and 1 being fully damaged. Check link for more info.

https://community.bistudio.com/wiki/Number



No Recoil

Code:

nrIndex = _this select 1;
while {(vars select nrIndex) == "1"} do
{
	player setUnitRecoilCoefficient 0;
};
if((vars select nrIndex) == "0") then
{
	player setUnitRecoilCoefficient 1;
};
https://community.bistudio.com/wiki/...oilCoefficient

nrIndex == "1" - Declaring that the value nrIndex is equal to 1.
while {(vars select nrIndex) == "1"} - When this is equal to 1 do whats inside the curly brackets.
player - as mentioned above.
setUnitRecoilCoefficient - This the value you are changing read the wiki for more info.
0 - Setting to 0 is no recoil, im not sure if 1 is the default value tho or if thats higher than the default
nrIndex == "0" - Allows it to be toggled. Could be done with an IF statement, I dont even know if ARMA supports IF statements tho.



I didnt write either of these Im sure they are in one of the public downloads.
I will update this with more scripting tutorials...
All Sqf Files_mpgh.net.zip347 B · 135 downloads Scanning…
Should make one of these tutorials for editing menu text color. I want to customize mine but can't figure it out like Rustler did.
Quote Originally Posted by darkangel1 View Post
Should make one of these tutorials for editing menu text color. I want to customize mine but can't figure it out like Rustler did.
vehicle player addAction ['<t color=''#FF4500''>God Mode</t>', 'Scripts\Menu_Scripts\godmode.sqf'];

Like that
<t color="#FF4500">
Very well done, thanks man! You deserve it.
Quick Player Heal

Code:
player setdammage 0;
http://community.bistudio.com/wiki/setDammage

Player - This is your current player, can also be subsituted for "This"
setdammage - Note the shitty spelling but as it says in wiki, they introduced setdamage to fix the spelling mistake but its interchangeable.
0 - Is of type "Number". 0 being not damaged and 1 being fully damaged. Check link for more info.

https://community.bistudio.com/wiki/Number



No Recoil

Code:

nrIndex = _this select 1;
while {(vars select nrIndex) == "1"} do
{
	player setUnitRecoilCoefficient 0;
};
if((vars select nrIndex) == "0") then
{
	player setUnitRecoilCoefficient 1;
};
https://community.bistudio.com/wiki/...oilCoefficient

nrIndex == "1" - Declaring that the value nrIndex is equal to 1.
while {(vars select nrIndex) == "1"} - When this is equal to 1 do whats inside the curly brackets.
player - as mentioned above.
setUnitRecoilCoefficient - This the value you are changing read the wiki for more info.
0 - Setting to 0 is no recoil, im not sure if 1 is the default value tho or if thats higher than the default
nrIndex == "0" - Allows it to be toggled. Could be done with an IF statement, I dont even know if ARMA supports IF statements tho.



I didnt write either of these Im sure they are in one of the public downloads.
This is actually a brilliant idea, good job man. Hope you stick with it.

Question, does that Player Heal only work on you, or can you heal someone else?
Quote Originally Posted by DEADS0NG View Post
This is actually a brilliant idea, good job man. Hope you stick with it.

Question, does that Player Heal only work on you, or can you heal someone else?
You can make one to heal others but you would need a good Exec
Quote Originally Posted by ikillindreams View Post
You can make one to heal others but you would need a good Exec
I dont think that is this case as your only changing a value the server already has

Quote Originally Posted by DEADS0NG View Post
This is actually a brilliant idea, good job man. Hope you stick with it.

Question, does that Player Heal only work on you, or can you heal someone else?
What it changes the damage setting it what you put before the setdammage part. In the example above its player but you could try cursortarget https://community.bistudio.com/wiki/cursorTarget. I havnt messed around with it enough but it should work.
I want to customize mine but can't figure it out like Rustler did.
How much does a bypasser usually go for?
Quote Originally Posted by xiner View Post
How much does a bypasser usually go for?
7-15 dollars usually, private ones are much much more expensive.
What do you mean with "much much more expensive." About how expensive? 100$ ?
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?