laatClaymore.sqf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. laatClaymoreIV={
  2. params ["_vic"];
  3. if (!local _vic) exitWith {};
  4. comment "data for weapons";
  5. comment"format of [weapon,weaponMagType,[[seat,ammoPerMag,MagCount],[seat,ammoPerMag,MagCount],......etc]]";
  6. weaponData=[
  7. ["Cannon_LAAT","1000Rnd_Laser_Cannon_LAAT",[[-1,1000,2]]],
  8. ["missiles_Jian","4Rnd_LG_Jian",[[-1,10,8],[0,1,1]]],
  9. ["weapon_rim116Launcher","magazine_Missile_rim116_x21",[[-1,8,1],[0,21,1]]],
  10. ["SmokeLauncher","SmokeLauncherMag",[[-1,2,20]]],
  11. ["CMFlareLauncher","300Rnd_CMFlare_Chaff_Magazine",[[-1,300,10]]],
  12. ["PomehiLauncherXT","400Rnd_Pomehi_Mag",[[-1,400,10]]],
  13. ["Cannon_TIE_FAST","10Rnd_FAST_Cannon_TIE",[[1,10,100],[2,10,100]]],
  14. ["Laserdesignator_pilotCamera","Laserbatteries",[[-1,1,1]]]
  15. ];
  16. comment "remove torpedos";
  17. for [{_i=0}, {_i<2}, {_i=_i+1}] do
  18. {
  19. _vic removeMagazineTurret ["laat_proton_torpedo" ,[-1]];
  20. _vic removeWeaponTurret["laat_proton_torpedo_launcher", [-1]];
  21. };
  22. comment "For each weapon";
  23. for [{_i=0}, {_i<(count weaponData)}, {_i=_i+1}] do
  24. {
  25. itemList=weaponData select _i;
  26. itemWeapon=itemList select 0;
  27. itemMagType=itemList select 1;
  28. itemSeats=itemList select 2;
  29. comment "for each seat";
  30. for [{_j=0}, {_j<(count itemSeats)}, {_j=_j+1}] do
  31. {
  32. seatData=itemSeats select _j;
  33. seatIndex=seatData select 0;
  34. seatAmmoPerMag=seatData select 1;
  35. seatMags=seatData select 2;
  36. _vic addWeaponTurret[itemWeapon, [seatIndex]];
  37. comment "adds mags";
  38. for [{_k=0}, {_k<(seatMags)}, {_k=_k+1}] do
  39. {
  40. _vic addMagazineTurret [itemMagType ,[seatIndex],seatAmmoPerMag];
  41. };
  42. };
  43. };
  44. comment "gets health";
  45. _vic addAction ["<t color='#00FF00'>Damage Report</t>",
  46. {
  47. hint parseText format["<t color='#0099FF'> Hull Integrity is :%1%2</t>",((1-(damage (_this select 0)))*100),"%"];
  48. },[1],0,false,true,""," driver _target == _this "];
  49. // function as file
  50. _vic addAction ["<t color='#886688'>Smoker--------U13</t>",
  51. {[_this select 0] execVM "scripts\zeus3denScripts\vehicleBased\actionMenu\Smoke\LAAT\laatSmokeTip.sqf";}
  52. ,[1],0,false,true,"User13"," driver _target == _this"];
  53. };
  54. ["swop_LAAT", "init",laatClaymoreIV, true, [], true] call CBA_fnc_addClassEventHandler;