Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies and more


[Mod/Install Guide] Adding Nitrous To Vehicles


merlin777

Recommended Posts

__________________________________________________________________________________________________

 

ADDING NITRO/NOS TO VEHICLES

__________________________________________________________________________________________________

Original work and Credit goes to: Sanbird
 

Since the opendayz.net website is no longer working many of the mods are gone. Epoch community still has some up and even few of those are linked back to opendayz.net and don't work or have missing support. So I am posting this for those who still prefer some fun mods to be added to their dayz epoch server. This will work for all Dayz Mods except for Vanilla

 

Any files we work with make sure you save a copy in a folder on your desktop or wherever you will remember. In case something goes wrong you always have a backup. And always always upload 1 mod at a time, and test them before proceeding with the next.

 

 
Step 1
 
Download your Mission Pbo and extract your zipped folder, then extract your mission pbo file
Find your fn_selfActions.sqf file.

Because I use Overpoch Origins,mine is located in the DAYZ_CODE->COMPILE Folder

 
In your fn_selfActions.sqf:
 
Look for at the beginning portion Where it says

private
["_isWreckBuilding',"......etc]

Add this

,"_hasNOSinstalled","_isaCar","_isNOSinstalled","_hasNOSitems"

into the beginning or the end before the closing bracket " ] " . Example:

,"_hasNOSinstalled","_isaCar","_isNOSinstalled","_hasNOSitems","_playerUID","_characterID"];

NEXT (we are still in the same file fn_selfActions.sqf)
 
Few lines down you will see

_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder);

Underneath that portion Paste the following:

 

 

if(NOSScript)then{
//Nitro action
_hasNOSinstalled = _vehicle getVariable["nitroinstalled",0];
if (_inVehicle && _vehicle isKindOf "Car" && speed _vehicle >= 1) then {
if (_inVehicle && _hasNOSinstalled == 1) then {
if (isnil("NITRO_Cond")) then {NITRO_Cond = false;};
if (s_player_nitrobooston <0) then {
if (NITRO_Cond) then {
s_player_nitrobooston = _vehicle addAction [("" + ("Nitro Off") + ""),"scripts\NOS\nitro.sqf", [_vehicle], 999, false,true,"","driver _target == _this"];
} else {
s_player_nitrobooston = _vehicle addAction [("" + ("Nitro On") + ""),"scripts\NOS\nitro.sqf", [_vehicle], 999, false,true,"","driver _target == _this"];
};
};
} else {

_vehicle removeAction s_player_nitrobooston;
s_player_nitrobooston = -1;
};
} else {

_vehicle removeAction s_player_nitrobooston;
s_player_nitrobooston = -1;
if (_hasNOSinstalled == 1) then {
_vehicle setVariable ["nitroinstalled", 1, true];
};
};
};

 

 

Further down in the same file fn_selfActions.sqf look for

if(dayz_tameDogs) then {

Directly above this line Paste the following code:

 

if(NOSScript)then{
_isaCar = _cursorTarget isKindOf "Car";
if (("ItemJerrycan" in _magazinesPlayer) && ("ItemSodaRbull" in _magazinesPlayer)) then {
_hasNOSitems = true;
} else {
_hasNOSitems = false;
};
_isNOSinstalled = _cursorTarget getVariable ["nitroinstalled", 0];
//RPT client spam fix
if (!isNil "_isNOSinstalled") then {
if (_isaCar && !locked _cursorTarget && _hasNOSitems && _isNOSinstalled == 0) then {
if (s_player_nitroInstall < 0) then {
s_player_nitroInstall = player addAction [("" + ("Install NOS boost") +""), "scripts\NOS\nitroinstall.sqf",_cursorTarget, 999, true, false, "",""];
};
} else {

player removeAction s_player_nitroInstall;
s_player_nitroInstall = -1;
};
};
};

 

 

WE ARE DONE WITH STEP 1 GO AHEAD AND SAVE IT

 

Step 2

 

Create a Folder in your mission pbo directory and call it "scripts" or download my zipped folder.

 

In that "scripts folder" make one called "NOS" and add the files I provided "nitro.sqf" and "nitroinstall.sqf" into that folder.
 

 

NOTE: you can name the folder anything you want and place wherever you want just remember to change the location our code placing was done in fn_selfActions.sqf and anywhere you see it in this tutorial to wherever you placed your folder.

 

 

 

Create another Folder in your mission pbo directory and call it "sounds" in it place the "nitro.ogg" file I have provided.

 

Step 3

 

Open your description.ext file and locate the portion for sound class as shown (unedited)

//SFX
class CfgSounds
{
    sounds[] = {};

};

If you already have things add in your sounds add like so

class nitro {
 name="nitro";
 sound[]={sounds\nitro.ogg,0.9,1};
 titles[] = {};
};

If you have nothing just like like so:

//SFX
 class CfgSounds
 {
    class nitro  {
    name="nitro";
    sound[]={sounds\nitro.ogg,0.9,1};
    titles[] = {};
 };
};

You are Done. Pack your pbo and upload and restart with bottom green button.

 

How to use the mod in game

 

Need:

1. Filled Jerry Can

2. Redbull

 

Walk up to a normal vehicle (no air or tanks) and use your scroller on your mouse button, you should see an option to install NOS.

 

Once Completed, get in the vehicle and drive a little bit above avg speed 25-35 and use your scroll mouse to scroll and pop up a menu it will say activate NOS, select and use it, than hit and hold left "Shift", you will hear your nitro boost.

 

HERE is a list of DIK codes to change functions

VIDEO OF HOW IT FUNCTIONS

scripts.zip

sounds.zip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...