Advertisement
Guest User

Untitled

a guest
Mar 25th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.90 KB | None | 0 0
  1. //LAV COMMAND CENTER-------------------------------------
  2. //HQ UNFOLD END
  3. if(cursorTarget isKindOf "LAV25_HQ" && (player distance cursorTarget < 10)) then {
  4. nearLAV = true;
  5. } else {
  6. nearLAV = false;
  7. };
  8. if (nearLAV) then {
  9. if (s_player_hq < 0) then {
  10. s_player_hq = player addAction [("<t color=""#0096ff"">" + ("Deploy HQ") +"</t>"),"scripts\HQ.sqf","",0,false,true,"",""];
  11. };
  12. } else {
  13. player removeAction s_player_hq;
  14. s_player_hq = -1;
  15. };
  16. //HQ UNFOLD END
  17. //HQ FOLD START
  18. if(cursorTarget isKindOf "LAV25_HQ_unfolded" and _canDo and (player distance cursorTarget < 10)) then {
  19. nearHQ = true;
  20. } else {
  21. nearHQ = false;
  22. };
  23. if (nearHQ) then {
  24. if (s_player_lav < 0) then {
  25. s_player_lav = player addAction [("<t color=""#0096ff"">" + ("Refold HQ") +"</t>"),"scripts\LAV.sqf","",0,false,true,"",""];
  26. };
  27. } else {
  28. player removeAction s_player_lav;
  29. s_player_lav = -1;
  30. };
  31. //HQ FOLD END
  32. //MRAZFEA START
  33. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3)) then {
  34. if (s_player_mrazfea < 0) then {
  35. s_player_mrazfea = player addAction ["Activate Anti-Zed Emitter","scripts\mrazfea.sqf",cursorTarget, 0, false, true, "",""];
  36. };
  37. } else {
  38. player removeAction s_player_mrazfea;
  39. s_player_mrazfea = -1;
  40. };
  41.  
  42. //MRAZFEA START
  43. //HQ ALARM START
  44. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3)) then {
  45. if (s_player_hqa < 0) then {
  46. s_player_hqa = player addAction ["Activate Alarm","scripts\HQalarm.sqf",cursorTarget, 0, false, true, "",""];
  47. };
  48. } else {
  49. player removeAction s_player_hqa;
  50. s_player_hqa = -1;
  51. };
  52.  
  53. //HQ ALARM START
  54. //HQ RADIO START
  55. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3)) then {
  56. if (s_player_hqr < 0) then {
  57. s_player_hqr = player addAction ["Scan for Incoming Signals","scripts\radioHQ.sqf",cursorTarget, 0, false, true, "",""];
  58. };
  59. } else {
  60. player removeAction s_player_hqr;
  61. s_player_hqr = -1;
  62. };
  63.  
  64. //HQ RADIO START
  65. //HQ CCTV START
  66. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3)) then {
  67. if (s_player_hqLaptop < 0) then {
  68. s_player_hqLaptop = player addAction ["Access Surveillance Grid","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
  69. };
  70. } else {
  71. player removeAction s_player_hqLaptop;
  72. s_player_hqLaptop = -1;
  73. };
  74. //HQ CCTV END
  75. //HQ DRONE TV START
  76. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3)) then {
  77. if (s_player_hqdronecam < 0) then {
  78. s_player_hqdronecam = player addAction ["Access Scout Pod Camera","cctv\initdrone.sqf",cursorTarget, 0, false, true, "",""];
  79. };
  80. } else {
  81. player removeAction s_player_hqdronecam;
  82. s_player_hqdronecam = -1;
  83. };
  84. //HQ DRONE TV END
  85.  
  86. //HQ TENT START
  87. private ["_camp"];
  88. _camp = count nearestObjects [_playerPos, ["ACamp_EP1"], 50] > 0;
  89. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_camp && (player distance cursorTarget < 12) && (player distance cursorTarget > 6)) then {
  90. if (s_player_hqcamp < 0) then {
  91. s_player_hqcamp = player addAction ["Deploy Tent","scripts\camp.sqf",cursorTarget, 0, false, true, "",""];
  92. };
  93. } else {
  94. player removeAction s_player_hqcamp;
  95. s_player_hqcamp = -1;
  96. };
  97. //HQ TENT END
  98.  
  99. //HQ BIKE START
  100. private ["_bike"];
  101. _bike = count nearestObjects [_playerPos, ["Old_bike_TK_CIV_EP1"], 50] > 0;
  102. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_bike && (player distance cursorTarget < 10)) then {
  103. if (s_player_hqbike < 0) then {
  104. s_player_hqbike = player addAction ["Deploy Scout Bike","scripts\scoutbike.sqf",cursorTarget, 0, false, true, "",""];
  105. };
  106. } else {
  107. player removeAction s_player_hqbike;
  108. s_player_hqbike = -1;
  109. };
  110. //HQ BIKE END
  111.  
  112. //HQ DRONE START
  113. private ["_drone"];
  114. _drone = count nearestObjects [_playerPos, ["Ka137_PMC"], 50] > 0;
  115. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_drone && (player distance cursorTarget < 10)) then {
  116. if (s_player_hqdrone < 0) then {
  117. s_player_hqdrone = player addAction ["Deploy Scout Pod","scripts\drone.sqf",cursorTarget, 0, false, true, "",""];
  118. };
  119. } else {
  120. player removeAction s_player_hqdrone;
  121. s_player_hqdrone = -1;
  122. };
  123. //HQ DRONE END
  124. //HQ LIGHT START
  125. private ["_lite"];
  126. _lite = count nearestObjects [_playerPos, ["SearchLight"], 50] > 0;
  127. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_lite && (player distance cursorTarget < 10)) then {
  128. if (s_player_hqlite < 0) then {
  129. s_player_hqlite = player addAction ["Deploy Search Light","scripts\light.sqf",cursorTarget, 0, false, true, "",""];
  130. };
  131. } else {
  132. player removeAction s_player_hqlite;
  133. s_player_hqlite = -1;
  134. };
  135. //HQ LIGHT END
  136. //HQ MG START
  137. private ["_mg"];
  138. _mg = count nearestObjects [_playerPos, ["M2StaticMG"], 50] > 0;
  139. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_mg && (player distance cursorTarget < 10)) then {
  140. if (s_player_hqmg < 0) then {
  141. s_player_hqmg = player addAction ["Deploy Machine Gun","scripts\mg.sqf",cursorTarget, 0, false, true, "",""];
  142. };
  143. } else {
  144. player removeAction s_player_hqmg;
  145. s_player_hqmg = -1;
  146. };
  147. //HQ MG END
  148. //HQ BARREL START
  149. private ["_bar"];
  150. _bar = count nearestObjects [_playerPos, ["Land_Fire_barrel"], 15] > 0;
  151. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_bar && (player distance cursorTarget < 10)) then {
  152. if (s_player_hqbar < 0) then {
  153. s_player_hqbar = player addAction ["Deploy Signal Fire","scripts\barrel.sqf",cursorTarget, 0, false, true, "",""];
  154. };
  155. } else {
  156. player removeAction s_player_hqbar;
  157. s_player_hqbar = -1;
  158. };
  159. //HQ BARREL END
  160. //HQ WATER START
  161. if (cursorTarget isKindOf "LAV25_HQ_unfolded" && (player distance cursorTarget < 3) && ("ItemWaterbottleUnfilled" in magazines player)) then {
  162. if (s_player_hqwater < 0) then {
  163. s_player_hqwater = player addAction ["Purified Water Supply","scripts\water.sqf",cursorTarget, 0, false, true, "",""];
  164. };
  165. } else {
  166. player removeAction s_player_hqwater;
  167. s_player_hqwater = -1;
  168. };
  169.  
  170. //HQ WATER END
  171. //HQ M4 START
  172. private ["_nearrifle", "_nearbyrifle", "_hasrifle"];
  173. _nearrifle = count nearestObjects [_playerPos, ["WeaponHolder_M4A1_Aim"], 20] > 0;
  174. _nearbyrifle = count nearestObjects [_playerPos, ["M4A1_Aim"], 20] > 0;
  175. _hasrifle = "M4A1_Aim" in weapons player;
  176. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_nearrifle && !_nearbyrifle && !_hasrifle && (player distance cursorTarget < 3)) then {
  177. if (s_player_hqm4 < 0) then {
  178. s_player_hqm4 = player addAction ["Take M4","scripts\m4.sqf",cursorTarget, 0, false, true, "",""];
  179. };
  180. } else {
  181. player removeAction s_player_hqm4;
  182. s_player_hqm4 = -1;
  183. };
  184. //HQ M4 START END
  185. //HQ M4 MAG START
  186. private ["_nearmag", "_nearbymag", "_hasmag"];
  187. _nearmag = count nearestObjects [_playerPos, ["WeaponHolder_30Rnd_556x45_Stanag"], 20] > 0;
  188. _nearbymag = count nearestObjects [_playerPos, ["30Rnd_556x45_Stanag"], 20] > 0;
  189. _hasmag = "30Rnd_556x45_Stanag" in magazines player;
  190. if (cursorTarget isKindOf "LAV25_HQ_unfolded" and !_nearmag && !_nearbymag && !_hasmag && (player distance cursorTarget < 3)) then {
  191. if (s_player_hqm4MAG < 0) then {
  192. s_player_hqm4MAG = player addAction ["Take STANAG Magazine","scripts\m4mag.sqf",cursorTarget, 0, false, true, "",""];
  193. };
  194. } else {
  195. player removeAction s_player_hqm4MAG;
  196. s_player_hqm4MAG = -1;
  197. };
  198. //HQ M4 MAG END
  199. //LAV COMMAND CENTER-------------------------------------
  200. //BTR90 COMMAND CENTER-------------------------------------
  201. //HQE UNFOLD END
  202. if(cursorTarget isKindOf "BTR90_HQ" && (player distance cursorTarget < 10)) then {
  203. nearBTR = true;
  204. } else {
  205. nearBTR = false;
  206. };
  207. if (nearBTR) then {
  208. if (s_player_hqe < 0) then {
  209. s_player_hqe = player addAction [("<t color=""#0096ff"">" + ("Deploy HQ") +"</t>"),"scripts\HQE.sqf","",0,false,true,"",""];
  210. };
  211. } else {
  212. player removeAction s_player_hqe;
  213. s_player_hqe = -1;
  214. };
  215. //HQE UNFOLD END
  216. //HQ FOLD START
  217. if(cursorTarget isKindOf "BTR90_HQ_unfolded" and _canDo and (player distance cursorTarget < 10)) then {
  218. nearHQe = true;
  219. } else {
  220. nearHQe = false;
  221. };
  222. if (nearHQe) then {
  223. if (s_player_btr < 0) then {
  224. s_player_btr = player addAction [("<t color=""#0096ff"">" + ("Refold HQ") +"</t>"),"scripts\BTR.sqf","",0,false,true,"",""];
  225. };
  226. } else {
  227. player removeAction s_player_btr;
  228. s_player_btr = -1;
  229. };
  230. //HQ FOLD END
  231. //MRAZFEA START
  232. if (cursorTarget isKindOf "BTR90_HQ_unfolded" && (player distance cursorTarget < 4)) then {
  233. if (s_player_mrazfeae < 0) then {
  234. s_player_mrazfeae = player addAction ["Activate Anti-Zed Emitter","scripts\mrazfeae.sqf",cursorTarget, 0, false, true, "",""];
  235. };
  236. } else {
  237. player removeAction s_player_mrazfeae;
  238. s_player_mrazfeae = -1;
  239. };
  240.  
  241. //MRAZFEA START
  242. //HQ ALARM START
  243. if (cursorTarget isKindOf "BTR90_HQ_unfolded" && (player distance cursorTarget < 4)) then {
  244. if (s_player_hqea < 0) then {
  245. s_player_hqea = player addAction ["Activate Alarm","scripts\HQalarme.sqf",cursorTarget, 0, false, true, "",""];
  246. };
  247. } else {
  248. player removeAction s_player_hqea;
  249. s_player_hqea = -1;
  250. };
  251.  
  252. //HQ ALARM START
  253. //HQ RADIO START
  254. if (cursorTarget isKindOf "BTR90_HQ_unfolded" && (player distance cursorTarget < 4)) then {
  255. if (s_player_hqer < 0) then {
  256. s_player_hqer = player addAction ["Scan for Incoming Signals","scripts\radioHQe.sqf",cursorTarget, 0, false, true, "",""];
  257. };
  258. } else {
  259. player removeAction s_player_hqer;
  260. s_player_hqer = -1;
  261. };
  262.  
  263. //HQ RADIO START
  264. //HQ CCTV START
  265. if (cursorTarget isKindOf "BTR90_HQ_unfolded" && (player distance cursorTarget < 4)) then {
  266. if (s_player_hqeLaptop < 0) then {
  267. s_player_hqeLaptop = player addAction ["Access Surveillance Grid","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
  268. };
  269. } else {
  270. player removeAction s_player_hqeLaptop;
  271. s_player_hqeLaptop = -1;
  272. };
  273. //HQ CCTV END
  274.  
  275.  
  276. //HQ TENT START
  277. //private ["_camp"];
  278. //_camp = count nearestObjects [_playerPos, ["ACamp_EP1"], 50] > 0;
  279. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_camp && (player distance cursorTarget < 12) && (player distance cursorTarget > 6)) then {
  280. if (s_player_hqecamp < 0) then {
  281. s_player_hqecamp = player addAction ["Deploy Tent","scripts\camp.sqf",cursorTarget, 0, false, true, "",""];
  282. };
  283. } else {
  284. player removeAction s_player_hqecamp;
  285. s_player_hqecamp = -1;
  286. };
  287. //HQ TENT END
  288.  
  289. //HQ BIKE START
  290. // private ["_bike"];
  291. //_bike = count nearestObjects [_playerPos, ["Old_bike_TK_CIV_EP1"], 50] > 0;
  292. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_bike && (player distance cursorTarget < 10)) then {
  293. if (s_player_hqebike < 0) then {
  294. s_player_hqebike = player addAction ["Deploy Scout Bike","scripts\scoutbike.sqf",cursorTarget, 0, false, true, "",""];
  295. };
  296. } else {
  297. player removeAction s_player_hqebike;
  298. s_player_hqebike = -1;
  299. };
  300. //HQ BIKE END
  301.  
  302. //HQ DRONE START
  303. //private ["_drone"];
  304. //_drone = count nearestObjects [_playerPos, ["Ka137_PMC"], 50] > 0;
  305. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_drone && (player distance cursorTarget < 10)) then {
  306. if (s_player_hqedrone < 0) then {
  307. s_player_hqedrone = player addAction ["Deploy Scout Pod","scripts\drone.sqf",cursorTarget, 0, false, true, "",""];
  308. };
  309. } else {
  310. player removeAction s_player_hqedrone;
  311. s_player_hqedrone = -1;
  312. };
  313. //HQ DRONE END
  314. //HQ LIGHT START
  315. //private ["_lite"];
  316. //_lite = count nearestObjects [_playerPos, ["SearchLight"], 50] > 0;
  317. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_lite && (player distance cursorTarget < 10)) then {
  318. if (s_player_hqelite < 0) then {
  319. s_player_hqelite = player addAction ["Deploy Search Light","scripts\light.sqf",cursorTarget, 0, false, true, "",""];
  320. };
  321. } else {
  322. player removeAction s_player_hqelite;
  323. s_player_hqelite = -1;
  324. };
  325. //HQ LIGHT END
  326. //HQ MG START
  327. //private ["_mg"];
  328. //_mg = count nearestObjects [_playerPos, ["M2StaticMG"], 50] > 0;
  329. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_mg && (player distance cursorTarget < 10)) then {
  330. if (s_player_hqemg < 0) then {
  331. s_player_hqemg = player addAction ["Deploy Machine Gun","scripts\mg.sqf",cursorTarget, 0, false, true, "",""];
  332. };
  333. } else {
  334. player removeAction s_player_hqemg;
  335. s_player_hqemg = -1;
  336. };
  337. //HQ MG END
  338. //HQ BARREL START
  339. //private ["_bar"];
  340. //_bar = count nearestObjects [_playerPos, ["Land_Fire_barrel"], 15] > 0;
  341. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_bar && (player distance cursorTarget < 10)) then {
  342. if (s_player_hqebar < 0) then {
  343. s_player_hqebar = player addAction ["Deploy Signal Fire","scripts\barrel.sqf",cursorTarget, 0, false, true, "",""];
  344. };
  345. } else {
  346. player removeAction s_player_hqebar;
  347. s_player_hqebar = -1;
  348. };
  349. //HQ BARREL END
  350. //HQ WATER START
  351. if (cursorTarget isKindOf "BTR90_HQ_unfolded" && (player distance cursorTarget < 4) && ("ItemWaterbottleUnfilled" in magazines player)) then {
  352. if (s_player_hqewater < 0) then {
  353. s_player_hqewater = player addAction ["Purified Water Supply","scripts\water.sqf",cursorTarget, 0, false, true, "",""];
  354. };
  355. } else {
  356. player removeAction s_player_hqewater;
  357. s_player_hqewater = -1;
  358. };
  359.  
  360. //HQ WATER END
  361. //HQ AK START
  362. private ["_nearakrifle", "_nearbyakifle", "_hasakrifle"];
  363. _nearakrifle = count nearestObjects [_playerPos, ["WeaponHolder_AK_74"], 20] > 0;
  364. _nearbyakifle = count nearestObjects [_playerPos, ["AK_74"], 20] > 0;
  365. _hasakrifle = "AK_74" in weapons player;
  366. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_nearakrifle && !_nearbyakifle && !_hasakrifle && (player distance cursorTarget < 3)) then {
  367. if (s_player_hqak < 0) then {
  368. s_player_hqak = player addAction ["Take AK 74","scripts\AK.sqf",cursorTarget, 0, false, true, "",""];
  369. };
  370. } else {
  371. player removeAction s_player_hqak;
  372. s_player_hqak = -1;
  373. };
  374. //HQ AK END
  375. //HQ AK MAG START
  376. private ["_nearakmag", "_nearbyakmag", "_hasakmag"];
  377. _nearakmag = count nearestObjects [_playerPos, ["WeaponHolder_30Rnd_545x39_AK"], 20] > 0;
  378. _nearbyakmag = count nearestObjects [_playerPos, ["30Rnd_545x39_AK"], 20] > 0;
  379. _hasakmag = "30Rnd_545x39_AK" in magazines player;
  380. if (cursorTarget isKindOf "BTR90_HQ_unfolded" and !_nearakmag && !_hasakmag && !_hasakmag && (player distance cursorTarget < 3)) then {
  381. if (s_player_hqakMAG < 0) then {
  382. s_player_hqakMAG = player addAction ["Take AK Magazine","scripts\magak.sqf",cursorTarget, 0, false, true, "",""];
  383. };
  384. } else {
  385. player removeAction s_player_hqakMAG;
  386. s_player_hqakMAG = -1;
  387. };
  388. //HQ AK MAG END
  389. //BTR90 COMMAND CENTER-------------------------------------
  390. //BMP COMMAND CENTER-------------------------------------
  391. //HQ BMP UNFOLD END
  392. if(cursorTarget isKindOf "BMP2_HQ_CDF" && (player distance cursorTarget < 10)) then {
  393. nearBMPHQ = true;
  394. } else {
  395. nearBMPHQ = false;
  396. };
  397. if (nearBMPHQ) then {
  398. if (s_player_hqBMP < 0) then {
  399. s_player_hqBMP = player addAction [("<t color=""#0096ff"">" + ("Deploy HQ") +"</t>"),"scripts\HQbmp.sqf","",0,false,true,"",""];
  400. };
  401. } else {
  402. player removeAction s_player_hqBMP;
  403. s_player_hqBMP = -1;
  404. };
  405. //HQ UNFOLD END
  406. //HQ FOLD START
  407. if(cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and _canDo and (player distance cursorTarget < 10)) then {
  408. nearHQbmp = true;
  409. } else {
  410. nearHQbmp = false;
  411. };
  412. if (nearHQbmp) then {
  413. if (s_player_bmp < 0) then {
  414. s_player_bmp = player addAction [("<t color=""#0096ff"">" + ("Refold HQ") +"</t>"),"scripts\bmp.sqf","",0,false,true,"",""];
  415. };
  416. } else {
  417. player removeAction s_player_bmp;
  418. s_player_bmp = -1;
  419. };
  420. //HQ FOLD END
  421. //MRAZFEA START
  422. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" && (player distance cursorTarget < 3)) then {
  423. if (s_player_mrazfeabmp < 0) then {
  424. s_player_mrazfeabmp = player addAction ["Activate Anti-Zed Emitter","scripts\mrazfeabmp.sqf",cursorTarget, 0, false, true, "",""];
  425. };
  426. } else {
  427. player removeAction s_player_mrazfeabmp;
  428. s_player_mrazfeabmp = -1;
  429. };
  430.  
  431. //MRAZFEA START
  432. //HQ ALARM START
  433. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" && (player distance cursorTarget < 3)) then {
  434. if (s_player_hqabmp < 0) then {
  435. s_player_hqabmp = player addAction ["Activate Alarm","scripts\HQalarmbmp.sqf",cursorTarget, 0, false, true, "",""];
  436. };
  437. } else {
  438. player removeAction s_player_hqabmp;
  439. s_player_hqabmp = -1;
  440. };
  441.  
  442. //HQ ALARM START
  443. //HQ RADIO START
  444. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" && (player distance cursorTarget < 3)) then {
  445. if (s_player_hqrbmp < 0) then {
  446. s_player_hqrbmp = player addAction ["Scan for Incoming Signals","scripts\radioHQbmp.sqf",cursorTarget, 0, false, true, "",""];
  447. };
  448. } else {
  449. player removeAction s_player_hqrbmp;
  450. s_player_hqrbmp = -1;
  451. };
  452.  
  453. //HQ RADIO START
  454. //HQ CCTV START
  455. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" && (player distance cursorTarget < 3)) then {
  456. if (s_player_bmphqLaptop < 0) then {
  457. s_player_bmphqLaptop = player addAction ["Access Surveillance Grid","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
  458. };
  459. } else {
  460. player removeAction s_player_bmphqLaptop;
  461. s_player_bmphqLaptop = -1;
  462. };
  463. //HQ CCTV END
  464.  
  465. //HQ TENT START
  466. //private ["_camp"];
  467. //_camp = count nearestObjects [_playerPos, ["ACamp_EP1"], 50] > 0;
  468. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_camp && (player distance cursorTarget < 12) && (player distance cursorTarget > 6)) then {
  469. if (s_player_bmphqcamp < 0) then {
  470. s_player_bmphqcamp = player addAction ["Deploy Tent","scripts\camp.sqf",cursorTarget, 0, false, true, "",""];
  471. };
  472. } else {
  473. player removeAction s_player_bmphqcamp;
  474. s_player_bmphqcamp = -1;
  475. };
  476. //HQ TENT END
  477.  
  478. //HQ BIKE START
  479. // private ["_bike"];
  480. //_bike = count nearestObjects [_playerPos, ["Old_bike_TK_CIV_EP1"], 50] > 0;
  481. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_bike && (player distance cursorTarget < 10)) then {
  482. if (s_player_bmphqbike < 0) then {
  483. s_player_bmphqbike = player addAction ["Deploy Scout Bike","scripts\scoutbike.sqf",cursorTarget, 0, false, true, "",""];
  484. };
  485. } else {
  486. player removeAction s_player_bmphqbike;
  487. s_player_bmphqbike = -1;
  488. };
  489. //HQ BIKE END
  490.  
  491. //HQ DRONE START
  492. // private ["_drone"];
  493. //_drone = count nearestObjects [_playerPos, ["Ka137_PMC"], 50] > 0;
  494. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_drone && (player distance cursorTarget < 10)) then {
  495. if (s_player_bmphqdrone < 0) then {
  496. s_player_bmphqdrone = player addAction ["Deploy Scout Pod","scripts\drone.sqf",cursorTarget, 0, false, true, "",""];
  497. };
  498. } else {
  499. player removeAction s_player_bmphqdrone;
  500. s_player_bmphqdrone = -1;
  501. };
  502. //HQ DRONE END
  503. //HQ LIGHT START
  504. //private ["_lite"];
  505. //_lite = count nearestObjects [_playerPos, ["SearchLight"], 50] > 0;
  506. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_lite && (player distance cursorTarget < 10)) then {
  507. if (s_player_bmphqlite < 0) then {
  508. s_player_bmphqlite = player addAction ["Deploy Search Light","scripts\light.sqf",cursorTarget, 0, false, true, "",""];
  509. };
  510. } else {
  511. player removeAction s_player_bmphqlite;
  512. s_player_bmphqlite = -1;
  513. };
  514. //HQ LIGHT END
  515. //HQ MG START
  516. //private ["_mg"];
  517. //_mg = count nearestObjects [_playerPos, ["M2StaticMG"], 50] > 0;
  518. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_mg && (player distance cursorTarget < 10)) then {
  519. if (s_player_bmphqmg < 0) then {
  520. s_player_bmphqmg = player addAction ["Deploy Machine Gun","scripts\mg.sqf",cursorTarget, 0, false, true, "",""];
  521. };
  522. } else {
  523. player removeAction s_player_bmphqmg;
  524. s_player_bmphqmg = -1;
  525. };
  526. //HQ MG END
  527. //HQ BARREL START
  528. //private ["_bar"];
  529. //_bar = count nearestObjects [_playerPos, ["Land_Fire_barrel"], 15] > 0;
  530. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" and !_bar && (player distance cursorTarget < 10)) then {
  531. if (s_player_bmphqbar < 0) then {
  532. s_player_bmphqbar = player addAction ["Deploy Signal Fire","scripts\barrel.sqf",cursorTarget, 0, false, true, "",""];
  533. };
  534. } else {
  535. player removeAction s_player_bmphqbar;
  536. s_player_bmphqbar = -1;
  537. };
  538. //HQ BARREL END
  539. //HQ WATER START
  540. if (cursorTarget isKindOf "BMP2_HQ_CDF_unfolded" && (player distance cursorTarget < 3) && ("ItemWaterbottleUnfilled" in magazines player)) then {
  541. if (s_player_bmphqwater < 0) then {
  542. s_player_bmphqwater = player addAction ["Purified Water Supply","scripts\water.sqf",cursorTarget, 0, false, true, "",""];
  543. };
  544. } else {
  545. player removeAction s_player_bmphqwater;
  546. s_player_bmphqwater = -1;
  547. };
  548.  
  549. //HQ WATER END
  550. //BMP COMMAND CENTER-------------------------------------
  551. //BDRM COMMAND CENTER-------------------------------------
  552. //HQ BMP UNFOLD END
  553. if(cursorTarget isKindOf "BRDM2_HQ_TK_GUE_EP1" && (player distance cursorTarget < 10)) then {
  554. nearBDRMHQ = true;
  555. } else {
  556. nearBDRMHQ = false;
  557. };
  558. if (nearBDRMHQ) then {
  559. if (s_player_hqBDRM < 0) then {
  560. s_player_hqBDRM = player addAction [("<t color=""#0096ff"">" + ("Deploy HQ") +"</t>"),"scripts\HQbdrm.sqf","",0,false,true,"",""];
  561. };
  562. } else {
  563. player removeAction s_player_hqBDRM;
  564. s_player_hqBDRM = -1;
  565. };
  566. //HQ UNFOLD END
  567. //HQ FOLD START
  568. if(cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and _canDo and (player distance cursorTarget < 10)) then {
  569. nearHQbdrm = true;
  570. } else {
  571. nearHQbdrm = false;
  572. };
  573. if (nearHQbdrm) then {
  574. if (s_player_bdrm < 0) then {
  575. s_player_bdrm = player addAction [("<t color=""#0096ff"">" + ("Refold HQ") +"</t>"),"scripts\bdrm.sqf","",0,false,true,"",""];
  576. };
  577. } else {
  578. player removeAction s_player_bdrm;
  579. s_player_bdrm = -1;
  580. };
  581. //HQ FOLD END
  582. //MRAZFEA START
  583. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" && (player distance cursorTarget < 3)) then {
  584. if (s_player_mrazfeabdrm < 0) then {
  585. s_player_mrazfeabdrm = player addAction ["Activate Anti-Zed Emitter","scripts\mrazfeab.sqf",cursorTarget, 0, false, true, "",""];
  586. };
  587. } else {
  588. player removeAction s_player_mrazfeabdrm;
  589. s_player_mrazfeabdrm = -1;
  590. };
  591.  
  592. //MRAZFEA START
  593. //HQ ALARM START
  594. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" && (player distance cursorTarget < 3)) then {
  595. if (s_player_hqabdrm < 0) then {
  596. s_player_hqabdrm = player addAction ["Activate Alarm","scripts\HQalarmb.sqf",cursorTarget, 0, false, true, "",""];
  597. };
  598. } else {
  599. player removeAction s_player_hqabdrm;
  600. s_player_hqabdrm = -1;
  601. };
  602.  
  603. //HQ ALARM START
  604. //HQ RADIO START
  605. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" && (player distance cursorTarget < 3)) then {
  606. if (s_player_hqrbdrm < 0) then {
  607. s_player_hqrbdrm = player addAction ["Scan for Incoming Signals","scripts\radioHQb.sqf",cursorTarget, 0, false, true, "",""];
  608. };
  609. } else {
  610. player removeAction s_player_hqrbdrm;
  611. s_player_hqrbdrm = -1;
  612. };
  613.  
  614. //HQ RADIO START
  615. //HQ CCTV START
  616. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" && (player distance cursorTarget < 3)) then {
  617. if (s_player_bdrmhqLaptop < 0) then {
  618. s_player_bdrmhqLaptop = player addAction ["Access Surveillance Grid","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
  619. };
  620. } else {
  621. player removeAction s_player_bdrmhqLaptop;
  622. s_player_bdrmhqLaptop = -1;
  623. };
  624. //HQ CCTV END
  625.  
  626. //HQ TENT START
  627. //private ["_camp"];
  628. //_camp = count nearestObjects [_playerPos, ["ACamp_EP1"], 50] > 0;
  629. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_camp && (player distance cursorTarget < 12) && (player distance cursorTarget > 6)) then {
  630. if (s_player_bdrmhqcamp < 0) then {
  631. s_player_bdrmhqcamp = player addAction ["Deploy Tent","scripts\camp.sqf",cursorTarget, 0, false, true, "",""];
  632. };
  633. } else {
  634. player removeAction s_player_bdrmhqcamp;
  635. s_player_bdrmhqcamp = -1;
  636. };
  637. //HQ TENT END
  638.  
  639. //HQ BIKE START
  640. // private ["_bike"];
  641. //_bike = count nearestObjects [_playerPos, ["Old_bike_TK_CIV_EP1"], 50] > 0;
  642. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_bike && (player distance cursorTarget < 10)) then {
  643. if (s_player_bdrmhqbike < 0) then {
  644. s_player_bdrmhqbike = player addAction ["Deploy Scout Bike","scripts\scoutbike.sqf",cursorTarget, 0, false, true, "",""];
  645. };
  646. } else {
  647. player removeAction s_player_bdrmhqbike;
  648. s_player_bdrmhqbike = -1;
  649. };
  650. //HQ BIKE END
  651.  
  652. //HQ DRONE START
  653. // private ["_drone"];
  654. //_drone = count nearestObjects [_playerPos, ["Ka137_PMC"], 50] > 0;
  655. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_drone && (player distance cursorTarget < 10)) then {
  656. if (s_player_bdrmhqdrone < 0) then {
  657. s_player_bdrmhqdrone = player addAction ["Deploy Scout Pod","scripts\drone.sqf",cursorTarget, 0, false, true, "",""];
  658. };
  659. } else {
  660. player removeAction s_player_bdrmhqdrone;
  661. s_player_bdrmhqdrone = -1;
  662. };
  663. //HQ DRONE END
  664. //HQ LIGHT START
  665. //private ["_lite"];
  666. //_lite = count nearestObjects [_playerPos, ["SearchLight"], 50] > 0;
  667. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_lite && (player distance cursorTarget < 10)) then {
  668. if (s_player_bdrmhqlite < 0) then {
  669. s_player_bdrmhqlite = player addAction ["Deploy Search Light","scripts\light.sqf",cursorTarget, 0, false, true, "",""];
  670. };
  671. } else {
  672. player removeAction s_player_bdrmhqlite;
  673. s_player_bdrmhqlite = -1;
  674. };
  675. //HQ LIGHT END
  676. //HQ MG START
  677. //private ["_mg"];
  678. //_mg = count nearestObjects [_playerPos, ["M2StaticMG"], 50] > 0;
  679. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_mg && (player distance cursorTarget < 10)) then {
  680. if (s_player_bdrmhqmg < 0) then {
  681. s_player_bdrmhqmg = player addAction ["Deploy Machine Gun","scripts\mg.sqf",cursorTarget, 0, false, true, "",""];
  682. };
  683. } else {
  684. player removeAction s_player_bdrmhqmg;
  685. s_player_bdrmhqmg = -1;
  686. };
  687. //HQ MG END
  688. //HQ BARREL START
  689. //private ["_bar"];
  690. //_bar = count nearestObjects [_playerPos, ["Land_Fire_barrel"], 15] > 0;
  691. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" and !_bar && (player distance cursorTarget < 10)) then {
  692. if (s_player_bdrmhqbar < 0) then {
  693. s_player_bdrmhqbar = player addAction ["Deploy Signal Fire","scripts\barrel.sqf",cursorTarget, 0, false, true, "",""];
  694. };
  695. } else {
  696. player removeAction s_player_bdrmhqbar;
  697. s_player_bdrmhqbar = -1;
  698. };
  699. //HQ BARREL END
  700. //HQ WATER START
  701. if (cursorTarget isKindOf "BRDM2_HQ_TK_GUE_unfolded_EP1" && (player distance cursorTarget < 3) && ("ItemWaterbottleUnfilled" in magazines player)) then {
  702. if (s_player_bdrmhqwater < 0) then {
  703. s_player_bdrmphqwater = player addAction ["Purified Water Supply","scripts\water.sqf",cursorTarget, 0, false, true, "",""];
  704. };
  705. } else {
  706. player removeAction s_player_bdrmphqwater;
  707. s_player_bdrmphqwater = -1;
  708. };
  709.  
  710. //HQ WATER END
  711. //BDRM COMMAND CENTER-------------------------------------
  712. //COMMAND TENT START
  713. //HQ FIRST AID START
  714. if (cursorTarget isKindOf "ACamp_EP1" && (player distance cursorTarget < 4)) then {
  715. if (s_player_fa < 0) then {
  716. s_player_fa = player addAction ["First Aid","scripts\bandage.sqf",cursorTarget, 0, false, true, "",""];
  717. };
  718. } else {
  719. player removeAction s_player_fa;
  720. s_player_fa = -1;
  721. };
  722.  
  723. //HQ FIRST AID END
  724. //HQ FOOD START
  725. private ["_nearMRE", "_nearbyMRE", "_hasMRE"];
  726. _nearMRE = count nearestObjects [_playerPos, ["WeaponHolder_FoodMRE"], 100] > 0;
  727. _nearbyMRE = count nearestObjects [_playerPos, ["FoodMRE"], 20] > 0;
  728. _hasMRE = "FoodMRE" in magazines player;
  729. if (cursorTarget isKindOf "ACamp_EP1" and !_nearMRE && !_nearbyMRE && !_hasMRE && (player distance cursorTarget < 4)) then {
  730. if (s_player_mre < 0) then {
  731. s_player_mre = player addAction ["Take Ration","scripts\mre.sqf",cursorTarget, 0, false, true, "",""];
  732. };
  733. } else {
  734. player removeAction s_player_mre;
  735. s_player_mre = -1;
  736. };
  737.  
  738. //HQ FOOD END
  739. //HQ TP START
  740. private ["_neartp", "_nearbytp", "_hastp"];
  741. _neartp = count nearestObjects [_playerPos, ["WeaponHolder_ItemTrashToiletpaper"], 100] > 0;
  742. _nearbytp = count nearestObjects [_playerPos, ["ItemTrashToiletpaper"], 20] > 0;
  743. _hastp = "ItemTrashToiletpaper" in magazines player;
  744. if (cursorTarget isKindOf "ACamp_EP1" and !_hastp && !_nearbytp && !_neartp && (player distance cursorTarget < 4)) then {
  745. if (s_player_tp < 0) then {
  746. s_player_tp = player addAction ["Take Toilet Paper","scripts\tp.sqf",cursorTarget, 0, false, true, "",""];
  747. };
  748. } else {
  749. player removeAction s_player_tp;
  750. s_player_tp = -1;
  751. };
  752.  
  753. //HQ TP END
  754. //HQ TENT DISPENSE START
  755. private ["_neartent", "_nearbytent", "_hastent"];
  756. _neartent = count nearestObjects [_playerPos, ["WeaponHolder_ItemTent"], 200] > 0;
  757. _nearbytent = count nearestObjects [_playerPos, ["TentStorage"], 20] > 0;
  758. _hastent = "ItemTent" in magazines player;
  759. if (cursorTarget isKindOf "ACamp_EP1" and !_neartent && !_nearbytent && !_hastent && (player distance cursorTarget < 4)) then {
  760. if (s_player_hqtentgive < 0) then {
  761. s_player_hqtentgive = player addAction ["Take Camping Tent","scripts\tentgive.sqf",cursorTarget, 0, false, true, "",""];
  762. };
  763. } else {
  764. player removeAction s_player_hqtentgive;
  765. s_player_hqtentgive = -1;
  766. };
  767. //HQ TENT DISPENSE END
  768. //COMMAND TENT END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement