[Release] NOS for cars!

FallingSheep

OpenDayZ Lord!
FULL CREDITS FOR THIS SCRIPT GOTO @Sandbird it was stolen from him and sent to me i had no idea and have all ready spoken to him about it.


again this was created by Sandbird and credit goes to him, please inculded him in your credits!

so lets start!

NOS
Version 0.1

What it does....
allows you to install nos and boost your car speed (needs 1 jerrycan and 1 redbull in your inventory)

Requirements
  • Easy = Blue <10
  • Text editor
  • custom fn_selfactions (there are plenty of how to's on this on the forum just search for it)

Installation Steps
open your desrciption.ext and add this to the sounds section

A: if you have custom sounds already
Code:
    class nitro  {
        name="nitro";
        sound[]={scripts\NOS\nitro.ogg,0.9,1};
        titles[] = {};
    };
B:if you dont have ANY custom sounds
Code:
class CfgSounds
{
    class nitro  {
        name="nitro";
        sound[]={scripts\NOS\nitro.ogg,0.9,1};
        titles[] = {};
    };
};
open your fn_selfactions and under
Code:
_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder);
paste this
Code:
//Nitro action
    _hasNOSinstalled = _vehicle getVariable["nitroinstalled",0];
    if (_inVehicle and _vehicle isKindOf "Car" and speed _vehicle >= 1) then {
        if (_inVehicle and _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 [("<t color=""#39C1F3"">" + ("Nitro Off") + "</t>"),"scripts\NOS\nitro.sqf", [_vehicle], 999, false,true,"","driver _target == _this"];
                } else {
                    s_player_nitrobooston = _vehicle addAction [("<t color=""#39C1F3"">" + ("Nitro On") + "</t>"),"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];
        };
    };
then at the bottom of fn_selfactions above
Code:
if(dayz_tameDogs) then {
paste this
Code:
        //Nitro
    _isaCar = _cursorTarget isKindOf "Car";
    if (("ItemJerrycan" in _magazinesPlayer) && ("ItemSodaRbull" in _magazinesPlayer)) then {
       _hasNOSitems = true;
    } else {
       _hasNOSitems = false;
    };
    _isNOSinstalled = _cursorTarget getVariable ["nitroinstalled", 0];
    if (_isaCar and !locked _cursorTarget and _hasNOSitems and _isNOSinstalled == 0) then {
        if (s_player_nitroInstall < 0) then {
            s_player_nitroInstall = player addAction [("<t color=""#39C1F3"">" + ("Install NOS boost") +"</t>"), "scripts\NOS\nitroinstall.sqf",_cursorTarget, 999, true, false, "",""];
        };
    } else {
        player removeAction s_player_nitroInstall;
        s_player_nitroInstall = -1;
    };
now download the file below and place it in your scripts folder in your MPMISSION folder
(if you dont have a scripts folder create one)

now go in game grab a jerrycan and a can of redbull find a car install nos on it from the scroll menu

then get in car and activate nos from the scroll menu

use SHIFT while driving to boost and SPACE to break hard!

 
Last edited:
I use this to only allow certain cars that "should" be able to be NOS'd
Code:
    //////////////////////NOS
    _isaCar = _typeOfCursorTarget in ["ArmoredSUV_PMC_DZE","car_hatchback","car_sedan","datsun1_civil_1_open","datsun1_civil_2_covered","datsun1_civil_3_open","hilux1_civil_1_open","hilux1_civil_2_covered","hilux1_civil_3_open_EP1",
                                     "HMMWV_DES_EP1","HMMWV_DZE","Lada1","Lada1_TK_CIV_EP1","Lada2","Lada2_TK_CIV_EP1","LadaLM","SUV_Blue","SUV_Camo","SUV_Charcoal","SUV_Green","SUV_Orange","SUV_Pink","SUV_Red","SUV_Silver","SUV_TK_CIV_EP1",
                                     "SUV_White","SUV_Yellow","VWGolf","350z_black","350z_blue","350z_city","350z_mod","350z_gold","350z_green","350z_pink","350z_kiwi","350z","350z_Red","350z_white","350z_ruben","350z_silver","350z_v","Copcarswat","Copcar","Copcarhw"];
    _isNOSinstalled = _cursorTarget getVariable ["nitroinstalled", 0];
 
Top