Guest User

Untitled

a guest
May 12th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. /*
  2. File: fn_setupStationService.sqf
  3. Author: NiiRoZz
  4. Edit: BoGuu - Added Tanoa Stations
  5.  
  6. Description:
  7. Add action fuel action in Station Service.
  8.  
  9. put function in init file then execute it with:
  10. call getFuelpumps;
  11. getFuelpumps =
  12. {
  13. _pos = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
  14. _Station = nearestobjects [_pos,["Land_fs_feed_F","Land_FuelStation_Feed_F","Land_FuelStation_01_pump_F","Land_FuelStation_02_pump_F","Land_FuelStation_01_pump_malevil_F"], 25000];
  15. _br = toString [13, 10];
  16. _tab = toString [9];
  17.  
  18. _TexteSortie = "_NiiRoZz_Station_Essence = [" + _br;
  19.  
  20. {
  21. _Array = [getpos _x];
  22. _TexteSortie = _TexteSortie + _tab + (str _Array);
  23. _TexteSortie = if (_forEachIndex < ((count _Station) - 1)) then {_TexteSortie + ", " + _br} else {_TexteSortie + _br};
  24. } forEach _Station;
  25. _TexteSortie = _TexteSortie + "];";
  26. hint "Completed";
  27. copyToClipboard _TexteSortie;
  28. };
  29. */
  30. private _kelleysislandPositions = [
  31. [7261.844,3543.121,0.300],
  32. [7270.737,3543.316,0.300],
  33. [7279.456,3543.066,0.300],
  34. [2396.848,922.185,0.300],
  35. [2388.203,924.556,0.300],
  36. [2379.990,926.975,0.300],
  37. [2387.579,951.403,0.300],
  38. [2395.739,948.729,0.300],
  39. [2404.384,946.358,0.300],
  40. [1406.542,1682.416,0.300],
  41. [1989.125,6297.911,0.300],
  42. [1989.655,6289.07,0.300],
  43. [1990.192,6280.411,0.300],
  44. [5353.133,2881.022,0.300],
  45. [4630.811,1845.597,0.300],
  46. [4762.144,4189.762,0.300],
  47. [3527.245,3093.541,0.300],
  48. [3518.410,3094.471,0.300],
  49. [3509.872,3095.552,0.300],
  50. [16871.7,15476.6,0.300],
  51. [3661.789,4009.122,0.300],
  52. [2413.232,4309.840,0.300],
  53. [2405.823,4304.934,0.300],
  54. [2398.255,4300.632,0.300],
  55. [3835.591,3148.951,0.300],
  56. [3826.916,3150.281,0.300],
  57. [3818.148,3151.380,0.300],
  58. [1723.188,3663.239,300],
  59. [1808.583,3858.925,0.300],
  60. [1803.421,3866.074,0.300],
  61. [1798.629,3873.48,0.300],
  62. [4009.984,4630.450,300]
  63. ];
  64.  
  65. private _altisPositions = [
  66. [9205.75,12112.2,-0.0487232],
  67. [11831.6,14155.9,-0.0342016],
  68. [12024.7,15830,-0.0298138],
  69. [12026.6,15830.1,-0.0342979],
  70. [12028.4,15830,-0.0388737],
  71. [9025.78,15729.4,-0.0206528],
  72. [9023.75,15729,-0.0271606],
  73. [9021.82,15728.7,-0.0293427],
  74. [16750.9,12513.1,-0.0525198],
  75. [6798.15,15561.6,-0.0441437],
  76. [6198.83,15081.4,-0.0912418],
  77. [14173.2,16541.8,-0.0946102],
  78. [5023.26,14429.6,-0.0978947],
  79. [5019.68,14436.7,-0.0114822],
  80. [4001.12,12592.1,-0.0966625],
  81. [17417.2,13936.7,-0.10652],
  82. [3757.14,13477.9,-0.0540276],
  83. [3757.54,13485.9,-0.010498],
  84. [16875.2,15469.4,0.037343],
  85. [16871.7,15476.6,0.010293],
  86. [8481.69,18260.7,-0.0266876],
  87. [15297.1,17565.9,-0.283808],
  88. [14221.4,18302.5,-0.0697155],
  89. [15781,17453.2,-0.285281],
  90. [19961.3,11454.6,-0.0349236],
  91. [19965.1,11447.6,-0.0483704],
  92. [5769,20085.7,-0.0156555],
  93. [21230.4,7116.56,-0.0604229],
  94. [20784.8,16665.9,-0.0521202],
  95. [20789.6,16672.3,-0.0213318],
  96. [23379.4,19799,-0.0544052],
  97. [25701.2,21372.6,-0.0774155]
  98. ];
  99.  
  100. private _tanoaPositions = [
  101. [7978.23,7419.24,-0.100807],
  102. [7976.92,7427.11,-0.058516],
  103. [5173.94,8806.35,-0.0822775],
  104. [8318.9,9708.81,-0.0886936],
  105. [8320.71,9712.02,-0.0936089],
  106. [5388.58,4090.7,-0.0951052],
  107. [5379.5,4092.98,-0.0942526],
  108. [10826.8,6489.7,-0.082561],
  109. [8970.37,10332.2,-0.0989342],
  110. [11146.1,5152,-0.0805874],
  111. [11154,5152.43,-0.0809298],
  112. [10935.1,9856.06,-0.129646],
  113. [10940.8,9855.39,-0.122383],
  114. [2462.99,7430.69,-0.0870638],
  115. [2451.51,7434.7,-0.0931244],
  116. [8494.36,12431.9,-0.110229],
  117. [8493.01,12437.9,-0.106827],
  118. [8492.14,12441.6,-0.0828552],
  119. [5594.15,12508.2,-0.0947819],
  120. [11631,2998.85,-0.0782437],
  121. [11642,2990.83,-0.0782394],
  122. [3029.45,11316.1,-0.0828028],
  123. [2137.26,3360.77,-0.0583258],
  124. [2132.29,3360.43,-0.0607367],
  125. [8952.38,13678,-0.0624466],
  126. [8954.36,13678,-0.0624466],
  127. [8956.19,13677.8,-0.0624466],
  128. [14364.7,8743.01,-0.0650101],
  129. [14260.9,11513,-0.114521],
  130. [14264.8,11508.9,-0.108963],
  131. [6886.99,7490.55,0],
  132. [7366.7,7995.42,-0.212462],
  133. [7358.5,7998.4,-0.190624],
  134. [7369.15,8002.09,-0.129763],
  135. [7360.96,8005.08,-0.171917],
  136. [5771.25,4239.42,-0.205085],
  137. [5776.41,4232.31,-0.232585],
  138. [5767.14,4236.94,-0.182347],
  139. [5781.14,4224.93,-0.229755],
  140. [5771.14,4229.01,-0.235736],
  141. [5775.74,4221.55,-0.232986],
  142. [5409.42,9905.04,0.00515461],
  143. [5403.54,9905.04,0.00549698],
  144. [5409.69,9913.75,0.00508261],
  145. [5403.81,9913.74,0.00502348],
  146. [5681.72,10164.6,-0.0340471],
  147. [5685.9,10173,-0.0219851],
  148. [5677.78,10173.8,-0.0185199],
  149. [5683.21,10182,-0.0282073],
  150. [5810.65,10816.9,0.0893035],
  151. [5801.93,10816.8,0.0450912],
  152. [5793.12,10817,0.0373325],
  153. [5810.71,10825.1,0.0521221],
  154. [5801.99,10825,0.039825],
  155. [5793.18,10825.1,0.0337515],
  156. [12613.3,7582.82,-0.264584],
  157. [12618.1,7580.01,-0.330997],
  158. [12617.5,7590.52,-0.225117],
  159. [12622.3,7587.7,-0.245724],
  160. [6600.12,13076.3,-0.249989],
  161. [6592,13079.6,-0.231892],
  162. [6602.45,13082,-0.230906],
  163. [6583.86,13082.9,-0.230913],
  164. [6594.32,13085.3,-0.230906],
  165. [6586.18,13088.6,-0.230906],
  166. [11686.6,2267.25,-0.208622],
  167. [11694.3,2271.39,-0.203085],
  168. [11689.9,2260.98,-0.205484],
  169. [11697.6,2265.13,-0.199961],
  170. [9953.85,13467,-0.23254],
  171. [9960.31,13466.6,-0.23254],
  172. [9954.45,13475.7,-0.23254],
  173. [9960.92,13475.4,-0.23254],
  174. [9954.69,13484.5,-0.23254],
  175. [9961.15,13484.2,-0.23254],
  176. [1873.69,12121.5,-0.248567],
  177. [1874.1,12127.6,-0.203133],
  178. [1864.93,12122,-0.331924],
  179. [1865.37,12128,-0.236609],
  180. [11618.7,13053,-0.255869],
  181. [11627,13050.4,-0.237558],
  182. [11635.3,13047.4,-0.229898],
  183. [11620.6,13058.4,-0.237006],
  184. [11629,13055.8,-0.232919],
  185. [11637.2,13052.8,-0.228891]
  186. ];
  187.  
  188. private _stationPositions = [[["Altis", _altisPositions], ["Tanoa", _tanoaPositions]]] call TON_fnc_terrainSort;
  189.  
  190. {
  191. private _pump = nearestObjects [_x,["Land_fs_feed_F","Land_FuelStation_01_pump_F","Land_FuelStation_02_pump_F"],5] select 0;
  192. _pump setFuelCargo 0;
  193. _pump addAction [localize "STR_Action_Pump", life_fnc_fuelStatOpen, 1, 3, true, true, "", '_this distance _target < 5 && cursorObject isEqualTo _target'];
  194. false
  195. } count _stationPositions;
Advertisement
Add Comment
Please, Sign In to add comment