_veh="Land_NAV_Lighthouse ";//<< change this to for example "AH1Z" for attack helicopter
{
_classname = _veh;
_logic = _x;
call compile format ['
newvehicle = _classname createVehicle %4;
newvehicle setpos %4;
newvehicle setdir %5;
newvehicle setVehicleInit "
this setVehicleVarName ""vehicle_%1_%2"";
vehicle_%1_%2 = this;
clearWeaponCargo this;
clearMagazineCargo this;
";
processInitCommands;
"INV_ServerVclArray = INV_ServerVclArray + [vehicle_%1_%2];if (""%3"" != """") then {[""CreatedVehicle"", vehicle_%1_%2, typeOf vehicle_%1_%2, %4] execVM ""%3"";};" call broadcast;
', _x, round(random 9999), INV_CALL_CREATVEHICLE, getpos _x, getdir _x];
} foreach playableunits;
doesnt work am i doing something wrong?