laatClaymore.sqf 1.9 KB

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