Hi this code if for a aircraft smoke trail script im creating but i cant seem to get it working in multiplayer so that other clients can see it also is there a way to create a kinda hadeling script so that once activated its starts the smoke script on all clients so they all can see it.
HOw would i go about doing this?
_unit = _this select 0;
_vol = 1.0;
_wei = 1.0;
_lifetime = 20;
_location = [];
_location2 = [];
smoketrail = false;
_act1 = vehicle _Unit AddAction [localize "STR_smokeon","scripts\mp_client\Effects\smokeswitchon.sqf"];
waitUntil {(smoketrail)};
_Unit RemoveAction _act1;
_act2 = vehicle _Unit AddAction [localize "STR_smokeoff","scripts\mp_client\Effects\smokeswitchoff.sqf"];
if(_unit isKindOf "A10")then{_location = [8,0,1.0];_location2 = [-8,0,1.0];};
if(_unit isKindOf "Camel")then{_location = [4,3,0.7];_location2 = [-4,3,0.7];};
if(_unit isKindOf "AV8B2")then{_location = [5,-2,0.0];_location2 = [-5,-2,0.0];};
if(_unit isKindOf "AV8B")then{_location = [4,0,0.0];_location2 = [-4,0,0.0];};
if(_unit isKindOf "Camel2")then{_location = [4,3,0.7];_location2 = [-4,3,0.7];};
if(_unit isKindOf "Su34")then{_location = [7.2,-4,-0.3];_location2 = [-7.2,-4,-0.3];};
if(_unit isKindOf "Su34B")then{_location = [7.2,-4,-0.3];_location2 = [-7.2,-4,-0.3];};
_partdir = [0,0,1];
_col1 = [random 0.9,random 0.9,random 0.9,0.9]; //Red
_col2 = [random 0.9,random 0.9,random 0.9,0.9]; //Green
_col3 = [random 0.9,random 0.9,random 0.9,0.9]; //Blue
_col4 = [random 0.9,random 0.9,random 0.9,0.9]; //Transparrent
_exhaustlight = "#lightpoint" createVehicle [0,0,0];
_exhaustlight setLightColor [0,0.3,1];
_exhaustlight setLightAmbient [0,0.3,1];
_exhaustlight setLightBrightness 0.00;
_exhaustlight LightAttachObject [_unit,[0,2,1]];
drop ["\ca\data\koulesvetlo","","Billboard",100,4,[10,-2.6,6],[0,0,1],0,1.5,1,0.0,[3,2,0.5,0.05],[_col1,_col2,_col3,_col4],[0],0,0,"","",_unit];
_smoketrail = "#particlesource" createVehicle getPos _unit;
_smoketrail setParticleParams ["\ca\data\missileSmoke","","Billboard",.01,_lifetime,_location,_partdir,0,_wei,_vol,0.05,[1,2.5,3,3.5],[_col1,_col2,_col3,_col4],[0],0,0,"","",_unit];
_smoketrail2 = "#particlesource" createVehicle getPos _unit;
_smoketrail2 setParticleParams ["\ca\data\missileSmoke","","Billboard",.01,_lifetime,_location2,_partdir,0,_wei,_vol,0.05,[1,2.5,3,3.5],[_col1,_col2,_col3,_col4],[0],0,0,"","",_unit];
while {alive _unit} do
{
_smoketrail2 setDropInterval 0.05;
_smoketrail setDropInterval 0.05;
sleep 0.01;
if(not smoketrail)ExitWith
{
vehicle _Unit RemoveAction _act1;
vehicle _Unit RemoveAction _act2;
_smoketrail setDropInterval 1;
_smoketrail2 setDropInterval 1;
deleteVehicle _smoketrail;
deleteVehicle _smoketrail2;
deleteVehicle _exhaustlight;
drop ["\ca\data\koulesvetlo","","Billboard",100,12,[0,-2.6,-1],[0,0,0],0,1.2,1,0.0,[0.05,0.5,2,3],[_col1,_col2,_col3,_col4],[0],0,0,"","",_unit];
_res= [vehicle _Unit] execVM "scripts\mp_client\Effects\smoketrail.sqf";
};
sleep 0.01;
if((not alive vehicle _unit))ExitWith
{
vehicle _Unit RemoveAction _act1;
vehicle _Unit RemoveAction _act2;
_smoketrail setDropInterval 1;
_smoketrail2 setDropInterval 1;
deleteVehicle _smoketrail;
deleteVehicle _smoketrail2;
deleteVehicle _exhaustlight;
drop ["\ca\data\koulesvetlo","","Billboard",100,12,[0,-2.6,-1],[0,0,0],0,1.2,1,0.0,[0.05,0.5,2,3],[_col1,_col2,_col3,_col4],[0],0,0,"","",_unit];
};
sleep 0.01;
};