Well,it doesn't work.So here are other scripts:
addtracerunit.sqf:
_u=_this select 0;
_in=_this select 1;
_d=true;
_cc=false;
if(count _this>2)then{
_cc=_this select 2;
};
if(count bn_trinits==count bn_trinits)then{_d=false;};
if _d then{
bn_trinits=[];
[]exec{\bn_tracer\inits.sqs};
};
bn_trinits=bn_trinits+[[_u,_in,_cc]];
addtracerunit2.sqf:
_u=_this select 0;
_in=_this select 1;
_cc=_this select 2;
_d=true;
_veh="man"counttype[_u]<1;
if(_veh&&count crew _u==0)then{
_i=-1;
_i2=-1;
while{_i2!=_i+1}do{
_u removeEventHandler["getin",_i2];
_u removeEventHandler["getin",_i];
_i=_u addEventHandler["getin",{}];
_i2=_u addEventHandler["getin",format[{[_this select 0,_this select 2,%1,%2,%3]call loadfile{\bn_tracer\getInVeh.sqf};},_in,_cc,_i+1]];
};
}else{
if(count bn_trunits==count bn_trunits)then{_d=false;};
_i=0;
_ci=_In;
_wep=primaryweapon _u;
_weps=weapons _u;
if _veh then{
if(count _weps>0)then{
_wep=_weps select 0;
};
};
if _d then{
if _cc then{
call loadfile{tracerSettings.cfg};
}else{
call loadfile{\BN_tracer\tracerSettings.cfg};
};
bn_trunits=[_ci];
bn_trunitswep=[_wep];
}else{
_i=count bn_trunits;
bn_trunits=bn_trunits+[_ci];
bn_trunitswep=bn_trunitswep+[_wep];
};
_c=call format["f%2d%3%4%1;%4%1",side _u,{in},{=},{bn_trcolor}];
_d=true;
if(count bn_trweapons==count bn_trweapons)then{_d=false;};
if(_wep!=""&&!_veh)then{
_d=true;
if(count call("bn_tr_"+_wep)==count call("bn_tr_"+_wep))then{_d=false;};
if _d then{
call format[{bn_tr_%1=[_in,_c];},_wep];
};
}else{
if _veh then{
{
_d=true;
if(count call("bn_tr_"+_x)==count call("bn_tr_"+_x))then{_d=false;};
if _d then{
call format[{bn_tr_%1=[_in,_c];},_x];
};
}foreach _weps;
};
};
_u addEventHandler["fired",format[{_this+%1 call loadFile{\bn_tracer\tracereh.sqf}},[_c,_in,_i]]];
};
getinveh.sqf:
_u=_this select 0;
_m=_this select 1;
_i=_this select 4;
_u removeEventHandler["getin",_i];
[_u,_this select 2,_this select 3]call loadfile{\bn_tracer\addTracerUnit.sqf};
init.sqs:
~3
{_x call loadfile{\bn_tracer\addTracerUnit2.sqf};}foreach bn_trinits;bn_trinits=nil
tracerEH.sqf:
_u=_this select 0;
_w1=_this select 1;
if(_w1==primaryweapon _u||"man"counttype[_u]<1)then{
_a=_this select 4;_c=_this select 5;_in=_this select 6;_i=_this select 7;
_w2=bn_trunitswep select _i;
_trace=false;
if(_w1==_w2)then{
_cnt=bn_trunits select _i;
if(_in<=_cnt)then{
_trace=true;
bn_trunits set[_i,1];
}else{
bn_trunits set[_i,_cnt+1];
};
}else{
_d=false;
if(count call("bn_tr_"+_w1)==count call("bn_tr_"+_w1))then{
_wd=call("bn_tr_"+_w1);
_c=_wd select 1;
_in=_wd select 0;
bn_trunits set[_i,2];
bn_trunitswep set[_i,_w1];
if(_in<=1)then{_trace=true;};
};
};
if _trace then{
_b=nearestObject[_u,_a];
_n=objnull;
if!(isnull _b)then{
_v=velocity _b;
_s=sqrt((_v select 0)^2+(_v select 1)^2+(_v select 2)^2);
if(_s>150)then{
_p=getpos _b;
_r=acos((_v select 2)/_s);
if!bn_trdedi then{
_n="BN_Tracer"camcreate _p;_n setdir getdir _b;_n animate["tracer_swing",_r/180];_n setvelocity _v;_n setObjectTexture[0,format["\bn_tracer\%1b.paa",_c]];
};
_r1=(_r mod .01)*100;
_r2=(_r mod .0001)*10000;
[_n,_b,_c,_p,local _u,_r1,_r2]exec{\bn_tracer\tracerkill.sqs};
};
};
};
};