neon lights for cars

dta-blitz

Member
looking for a scripter to make this script

basically a chem light or multi option for different colour chem lights attached to a car for example a suv with a toggle on and off on scroll wheel = neon lights for cars i know this script is out there alrdy somewhere just wondering if anyone could remake it and release it for public thanks for your time reading this.

bump it enough and someone may release it ^_^
 
i doubt it, the original as far as i know was made by Sandbird, it was stolen from his server way before the dayz license thing, it require edits to client and server, out of respect for @Sandbird i cant release any thing to do with it unless he oks it, but its not a very complicated script and you could modify the sirens script on this forum to do this :but it would save on restarts
 
This is not hard to script indeed.
Why dont you try to make it and release it for the community?
You can just try to attach Chemlights to the Cars and a Scroll-Option which creates them and detach/delete them on other option.
Other way which would be a bit more complicated, but i thing it would be nicer:
Just try to attach lights effects to the car, here is a Script which do it with road flares:
Code:
            _lightArea = "#lightpoint" createVehicleLocal (getPosATL _car);
            _lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005];
            _lightArea setLightAmbient [0.2,0.01,0.01];
            _lightArea setLightBrightness 0.2;
            _lightArea lightAttachObject [_car, [0,0,0]];

            //Spark Light
            _lightSpark = "#lightpoint" createVehicleLocal (getPosATL _car);
            _lightSpark setLightColor [0.1,0.1,0.1];
            _lightSpark setLightAmbient [0.05,0.05,0.05];
            _lightSpark setLightBrightness 0.05;
            _lightSpark lightAttachObject [_car, [0,0,0]];

            while {alive _car} do {
                _lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
                //_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
                sleep (random 0.1);
            };
 
ah ty for help not really experienced with creating scripts il leave it to pro's like your selfs will try attempt though cos coding looks fun :p
 
This is not hard to script indeed.
Why dont you try to make it and release it for the community?
You can just try to attach Chemlights to the Cars and a Scroll-Option which creates them and detach/delete them on other option.
Other way which would be a bit more complicated, but i thing it would be nicer:
Just try to attach lights effects to the car, here is a Script which do it with road flares:
Code:
            _lightArea = "#lightpoint" createVehicleLocal (getPosATL _car);
            _lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005];
            _lightArea setLightAmbient [0.2,0.01,0.01];
            _lightArea setLightBrightness 0.2;
            _lightArea lightAttachObject [_car, [0,0,0]];

            //Spark Light
            _lightSpark = "#lightpoint" createVehicleLocal (getPosATL _car);
            _lightSpark setLightColor [0.1,0.1,0.1];
            _lightSpark setLightAmbient [0.05,0.05,0.05];
            _lightSpark setLightBrightness 0.05;
            _lightSpark lightAttachObject [_car, [0,0,0]];

            while {alive _car} do {
                _lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
                //_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
                sleep (random 0.1);
            };
ah now i see :) ill try use your method and see if i can get it to work with chemlights.
 
You can probably look up the light code for chemlights to get the lightcolor code and just use that in your manufactured light. I'd suggest offseting it below the car a bit.
 
You can probably look up the light code for chemlights to get the lightcolor code and just use that in your manufactured light. I'd suggest offseting it below the car a bit.
to start with it will be the basic colors, red, blue, green and yellow, but i may add more (pretty easy to change the color codes) the hard part is getting the offset/postion for each vehicle :) i may just put it in the center under the car for no and to get it working, later i may change it so its on the side of the cars but i doubt i will have time :)
 
that will get complicated. If you make it a dull glow under the center, it should be cool enough. Have to skip bikes and such though.
 
neon_light.sqf

if (speed player < 0) then {
_chem0 = "HandChemBlue" createVehicle (position player);
_chem0 attachTo [vehicle player,[0,0,0]];
_chem1 = "HandChemGreen" createVehicle (position player);
_chem1 attachTo [vehicle player,[0,0,0]];
_chem2 = "HandChemRed" createVehicle (position player);
_chem2 attachTo [vehicle player,[0,0,0]];
};


nls.sqf

if (isServer) exitwith {};
waitUntil {sleep 2; count vehicles > 1};
sleep 10;
{
If (typeOf _x in ["SUV_Pink"]) then {
_neonlight = _x addAction [("<t color=""#2bc0a7"">Neon Light</t>"),"neon_light.sqf","write",1,false,true,"","driver _target == player"];
};
}forEach (vehicles);
};


then _nul = [] execVM "nls.sqf"; in init.sqf


failed :( any idea where im going wrong
 
neon_light.sqf

if (speed player < 0) then {
_chem0 = "HandChemBlue" createVehicle (position player);
_chem0 attachTo [vehicle player,[0,0,0]];
_chem1 = "HandChemGreen" createVehicle (position player);
_chem1 attachTo [vehicle player,[0,0,0]];
_chem2 = "HandChemRed" createVehicle (position player);
_chem2 attachTo [vehicle player,[0,0,0]];
};


nls.sqf

if (isServer) exitwith {};
waitUntil {sleep 2; count vehicles > 1};
sleep 10;
{
If (typeOf _x in ["SUV_Pink"]) then {
_neonlight = _x addAction [("<t color=""#2bc0a7"">Neon Light</t>"),"neon_light.sqf","write",1,false,true,"","driver _target == player"];
};
}forEach (vehicles);
};


then _nul = [] execVM "nls.sqf"; in init.sqf


failed :( any idea where im going wrong
Are you even getting the scroll wheel option? I'm fairly certain you should because you got that from spectres SkyWrite. Your problem in neon_light.sqf is here:
Code:
if (speed player < 0) then  {
which reads as if the players speed is less than 0 then proceed, which is an impossible statement to reach.
Code:
if (speed player > 0) then  {
 
ok let me give you some help here :)

first what you need is the fn_selfaction.sqf (if you not having one, i will help you to get it)
Next step would be if you tell me on which mod you want to install it, its not that important but could help to get this easier done.

so lets start from the beginning:

We try to add a action menu:
since we do not need a target on the we can do the whole thing above the cursortarget part

so somewhere near the top we add something like this:

Code:
if (_inVehicle && (_vehicle isKindOf "ArmoredSUV_Base_PMC")) then { //only SUV will get this option
   if (schwedes_neonlight < 0) then {
     schwedes_neonlight = _vehicle addAction ["Neon Light","custom\neonlight.sqf",_vehicle,5,false,true];
   };
} else {
   _vehicle removeAction schwedes_neonlight;
   schwedes_neonlight = -1;
};

and for neonlight.sqf something like this:

Code:
private ["_vehicle","_chemlight"];

_vehicle = _this select 3;


_chemlight = createVehicle ["HandChemGreen", (position _vehicle), [], 0, 'CAN_COLLIDE'];

// if you want random color try this: line
//_chemlight =  ["HandChemBlue","HandChemGreen","HandChemRed"] call bis_fnc_selectrandom;

_chemlight attachTo [_vehicle, [0, 0, -0.5]]; //try to get the right offset [x, y, z]

This should create and attach the chemlight to your vehicle. BUT i dont know if the chemlight is even glowing on creating and if its expire after time and gets deleted.
Code was not testes, but this should give you a little idea how it could work :)

Are you even getting the scroll wheel option? I'm fairly certain you should because you got that from spectres SkyWrite. Your problem in neon_light.sqf is here:
Code:
if (speed player < 0) then  {
which reads as if the players speed is less than 0 then proceed, which is an impossible statement to reach.
Code:
if (speed player > 0) then  {

Yes it is possible when the player runs/drives backwards if i remember right ^^
 
got action menu no chem light yet though il have mess around see if i can get it to glow or something else to replace chem light

thank you massive help
 
Ok as I thought.
I will post you tomorrow a version which will definitely work, you will just need to make some changes to your liking (*^o^*)
 
Back
Top