Guest User

Fleeca Robbery

a guest
Feb 20th, 2018
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 119.13 KB | None
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Drawing;
  7. using System.IO;
  8. using System.Windows.Forms;
  9. using GTA;
  10. using GTA.Native;
  11. using GTA.Math;
  12. using Font = GTA.Font;
  13.  
  14. namespace RobFleeca
  15.  
  16. {
  17. public class RobFleeca : Script
  18. {
  19. private ScriptSettings KeysData;
  20.  
  21. Driller Drill;
  22.  
  23. List<Rob> Robs = new List<Rob>();
  24.  
  25. List<Vector3> Bank_Locations = new List<Vector3>();
  26.  
  27. List<Vector3> EnterExitBank_Locations = new List<Vector3>();
  28.  
  29. List<Vector3> Cam1_Locations = new List<Vector3>();
  30. List<Vector3> Cam2_Locations = new List<Vector3>();
  31. List<Vector3> Cam3_Locations = new List<Vector3>();
  32. List<Vector3> Cam4_Locations = new List<Vector3>();
  33. List<Vector3> Cam5_Locations = new List<Vector3>();
  34.  
  35. List<float> Cam1_Heading = new List<float>();
  36. List<float> Cam2_Heading = new List<float>();
  37. List<float> Cam3_Heading = new List<float>();
  38. List<float> Cam4_Heading = new List<float>();
  39. List<float> Cam5_Heading = new List<float>();
  40.  
  41. List<Vector3> Teller_Locations = new List<Vector3>();
  42. List<float> Teller_Heading = new List<float>();
  43.  
  44. List<Vector3> Hostage1_Locations = new List<Vector3>();
  45. List<float> Hostage1_Heading = new List<float>();
  46.  
  47. List<Vector3> Hostage2_Locations = new List<Vector3>();
  48. List<float> Hostage2_Heading = new List<float>();
  49.  
  50. List<Vector3> Hostage3_Locations = new List<Vector3>();
  51. List<float> Hostage3_Heading = new List<float>();
  52.  
  53. List<Vector3> Teller_Walk_Locations1 = new List<Vector3>();
  54. List<Vector3> Teller_Walk_Locations2 = new List<Vector3>();
  55.  
  56. List<Vector3> FleecaDoor_Locations = new List<Vector3>();
  57. List<float> FleecaDoor_Heading = new List<float>();
  58.  
  59. List<Vector3> FleecaVaultDoor_Locations = new List<Vector3>();
  60. List<float> FleecaVaultDoor_Heading = new List<float>();
  61.  
  62. List<Vector3> FleecaVaultDoor_KeyPad_Locations = new List<Vector3>();
  63.  
  64. List<Vector3> FleecaVaultDrill_Locations = new List<Vector3>();
  65. List<float> FleecaVaultDrill_Heading = new List<float>();
  66.  
  67. List<Vector3> FleecaVaultBoxWall_Locations = new List<Vector3>();
  68. List<float> FleecaVaultBoxWall_Heading = new List<float>();
  69.  
  70. List<Vector3> FleecaVaultBoxDoor_Locations = new List<Vector3>();
  71. List<float> FleecaVaultBoxDoor_Heading = new List<float>();
  72.  
  73. int MinCash = 0;
  74.  
  75. int MaxCash = 0;
  76.  
  77. int WantedLevel = 4;
  78.  
  79. int Passed_Index = -1;
  80.  
  81. int time = 0;
  82. bool run = false;
  83. int Scale;
  84. int step = -1;
  85.  
  86. string WhoDied;
  87.  
  88.  
  89. List<bool> BankAvalible = new List<bool>();
  90.  
  91. bool BankRobbed1;
  92. bool BankRobbed2;
  93. bool BankRobbed3;
  94. bool BankRobbed4;
  95. bool BankRobbed5;
  96. bool BankRobbed6;
  97.  
  98. bool ShowBlips;
  99.  
  100. public RobFleeca()
  101. {
  102. BankAvalible.Add(true);
  103. BankAvalible.Add(true);
  104. BankAvalible.Add(true);
  105. BankAvalible.Add(true);
  106. BankAvalible.Add(true);
  107. BankAvalible.Add(true);
  108.  
  109. ////// bank 1 ocean
  110. Bank_Locations.Add(new Vector3(-2975.3f, 483.17f, 14.0f)); // green marker
  111.  
  112. EnterExitBank_Locations.Add(new Vector3(-2965.7f, 482.64f, 15.91f));
  113.  
  114. Cam1_Locations.Add(new Vector3(-2962.176f, 486.5187f, 17.38165f)); // 168901740 prop_cctv_cam_06a coords for cams
  115. Cam2_Locations.Add(new Vector3(-2960.813f, 476.3674f, 17.88708f));
  116. Cam3_Locations.Add(new Vector3(-2959.599f, 476.3453f, 17.88706f));
  117. Cam4_Locations.Add(new Vector3(-2958.923f, 478.9213f, 17.67277f));
  118. Cam5_Locations.Add(new Vector3(-2963.956f, 478.9629f, 17.34873f)); // -1340405475 prop_cctv_cam_07a
  119.  
  120.  
  121. Teller_Walk_Locations1.Add(new Vector3(-2960.813f, 477.5f, 17.88708f));
  122. Teller_Walk_Locations2.Add(new Vector3(-2958.3f, 477.7f, 17.88706f));
  123.  
  124. Teller_Locations.Add(new Vector3(-2960.8f, 482.7f, 15.7f)); // teller a_m_y_business_01 a_m_y_busicas_01
  125. Teller_Heading.Add(+90.0f);
  126.  
  127. Hostage1_Locations.Add(new Vector3(-2964.2f, 486.7f, 14.2f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  128. Hostage1_Heading.Add(+180.0f);
  129.  
  130. Hostage2_Locations.Add(new Vector3(-2965.7f, 478.6f, 14.2f));
  131. Hostage2_Heading.Add(-90.0f);
  132.  
  133. Hostage3_Locations.Add(new Vector3(-2963.0f, 481.6f, 14.7f));
  134. Hostage3_Heading.Add(-90.0f);
  135.  
  136. FleecaDoor_Locations.Add(new Vector3(-2960.176f, 479.0105f, 15.97056f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  137. FleecaDoor_Heading.Add(357.5421f);
  138.  
  139. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(-2956.3f, 481.6f, 15.8f));
  140.  
  141. FleecaVaultDoor_Locations.Add(new Vector3(-2958.539f, 482.2706f, 15.83594f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  142.  
  143. FleecaVaultDoor_Heading.Add(357.5421f);
  144.  
  145. FleecaVaultDrill_Locations.Add(new Vector3(-2953.2f, 484.715f, 14.7f));
  146. FleecaVaultDrill_Heading.Add(-92.5f);
  147.  
  148. FleecaVaultBoxWall_Locations.Add(new Vector3(-2952.2f, 484.3f, 15.88f));
  149. FleecaVaultBoxWall_Heading.Add(-92.5f);
  150.  
  151. FleecaVaultBoxDoor_Locations.Add(new Vector3(-2952.37f, 484.81f, 17.039f));
  152. FleecaVaultBoxDoor_Heading.Add(-92.5f);
  153.  
  154. ////// bank 2 near lifeinvader
  155. Bank_Locations.Add(new Vector3(-1220.5f, -317.5f, 36.4f)); // green marker
  156.  
  157. EnterExitBank_Locations.Add(new Vector3(-1213.96f, -327.28f, 36.8f));
  158.  
  159. Cam1_Locations.Add(new Vector3(-1209.339f, -329.3076f, 39.4656f)); // 168901740 prop_cctv_cam_06a coords for cams
  160. Cam2_Locations.Add(new Vector3(-1217.521f, -335.4675f, 39.97102f));
  161. Cam3_Locations.Add(new Vector3(-1216.972f, -336.5515f, 39.971f));
  162. Cam4_Locations.Add(new Vector3(-1214.37f, -335.864f, 39.75671f));
  163. Cam5_Locations.Add(new Vector3(-1216.798f, -331.4561f, 39.43268f)); // -1340405475 prop_cctv_cam_07a
  164.  
  165.  
  166. Teller_Walk_Locations1.Add(new Vector3(-1216.35f, -335.1f, 36.66f));
  167. Teller_Walk_Locations2.Add(new Vector3(-1215.4f, -337.2f, 36.6f));
  168.  
  169. Teller_Locations.Add(new Vector3(-1212.2f, -332.5f, 37.8f)); // teller a_m_y_business_01 a_m_y_busicas_01
  170. Teller_Heading.Add(26.8637f);
  171.  
  172. Hostage1_Locations.Add(new Vector3(-1210.1f, -327.7f, 36.3f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  173. Hostage1_Heading.Add(+115.0f);
  174.  
  175. Hostage2_Locations.Add(new Vector3(-1217.9f, -330.1f, 36.3f));
  176. Hostage2_Heading.Add(205.0f);
  177.  
  178. Hostage3_Locations.Add(new Vector3(-1214.1f, -331.3f, 36.8f));
  179. Hostage3_Heading.Add(165.0f);
  180.  
  181. FleecaDoor_Locations.Add(new Vector3(-1214.905f, -334.7281f, 38.05551f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  182. FleecaDoor_Heading.Add(296.8637f);
  183.  
  184. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(-1210.65f, -336.4f, 37.56f));
  185.  
  186. FleecaVaultDoor_Locations.Add(new Vector3(-1211.261f, -334.5596f, 37.91989f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  187.  
  188. FleecaVaultDoor_Heading.Add(296.8637f);
  189.  
  190. FleecaVaultDrill_Locations.Add(new Vector3(-1206.572f, -338.0f, 36.82f));
  191. FleecaVaultDrill_Heading.Add(-152.8f);
  192.  
  193. FleecaVaultBoxWall_Locations.Add(new Vector3(-1206.43f, -339.1f, 38.0f));
  194. FleecaVaultBoxWall_Heading.Add(-152.8f);
  195.  
  196. FleecaVaultBoxDoor_Locations.Add(new Vector3(-1206.072f, -338.69f, 39.159f));
  197. FleecaVaultBoxDoor_Heading.Add(-152.8f);
  198.  
  199. ////// bank 3 burton
  200. Bank_Locations.Add(new Vector3(-344.69f, -28.5f, 46.4f)); // green marker
  201.  
  202. EnterExitBank_Locations.Add(new Vector3(-349.67f, -46.4f, 49.0f));
  203.  
  204. Cam1_Locations.Add(new Vector3(-347.6229f, -51.30733f, 50.72114f)); // 168901740 prop_cctv_cam_06a coords for cams
  205. Cam2_Locations.Add(new Vector3(-357.7383f, -49.69931f, 51.22656f));
  206. Cam3_Locations.Add(new Vector3(-358.1367f, -50.84728f, 51.22655f));
  207. Cam4_Locations.Add(new Vector3(-355.8343f, -52.24216f, 51.01226f));
  208. Cam5_Locations.Add(new Vector3(-354.3498f, -47.43351f, 50.68822f)); // -1340405475 prop_cctv_cam_07a
  209.  
  210.  
  211. Teller_Walk_Locations1.Add(new Vector3(-356.8f, -50.15f, 48.2f));
  212. Teller_Walk_Locations2.Add(new Vector3(-357.6f, -52.4f, 48.2f));
  213.  
  214. Teller_Locations.Add(new Vector3(-352.6f, -51.6f, 49.2f)); // teller a_m_y_business_01 a_m_y_busicas_01
  215. Teller_Heading.Add(-25.0f);
  216.  
  217. Hostage1_Locations.Add(new Vector3(-347.2f, -50.4f, 47.55f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  218. Hostage1_Heading.Add(85.0f);
  219.  
  220. Hostage2_Locations.Add(new Vector3(-356.6f, -46.6f, 47.55f));
  221. Hostage2_Heading.Add(-105.0f);
  222.  
  223. Hostage3_Locations.Add(new Vector3(-352.1f, -49.2f, 48.1f));
  224. Hostage3_Heading.Add(-195.0f);
  225.  
  226. FleecaDoor_Locations.Add(new Vector3(-355.3892f, -51.06769f, 49.31105f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  227. FleecaDoor_Heading.Add(250.5898f);
  228.  
  229. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(-353.7f, -55.3f, 49.0f));
  230.  
  231. FleecaVaultDoor_Locations.Add(new Vector3(-352.7365f, -53.57248f, 49.17543f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  232.  
  233. FleecaVaultDoor_Heading.Add(250.8598f);
  234.  
  235. FleecaVaultDrill_Locations.Add(new Vector3(-351.918f, -59.38f, 48.05f));
  236. FleecaVaultDrill_Heading.Add(160.75f);
  237.  
  238. FleecaVaultBoxWall_Locations.Add(new Vector3(-352.6f, -60.2f, 49.225f));
  239. FleecaVaultBoxWall_Heading.Add(160.75f);
  240.  
  241. FleecaVaultBoxDoor_Locations.Add(new Vector3(-352.06f, -60.18f, 50.384f));
  242. FleecaVaultBoxDoor_Heading.Add(160.75f);
  243.  
  244. ////// bank 4 alta
  245. Bank_Locations.Add(new Vector3(318.1f, -266.1f, 52.6f)); // green marker
  246.  
  247. EnterExitBank_Locations.Add(new Vector3(315.3f, -276.1f, 54.0f));
  248.  
  249. Cam1_Locations.Add(new Vector3(317.5102f, -280.554f, 55.84935f)); // 168901740 prop_cctv_cam_06a coords for cams
  250. Cam2_Locations.Add(new Vector3(307.4242f, -278.7708f, 56.35477f));
  251. Cam3_Locations.Add(new Vector3(307.0059f, -279.9117f, 56.35476f));
  252. Cam4_Locations.Add(new Vector3(309.2838f, -281.3463f, 56.14047f));
  253. Cam5_Locations.Add(new Vector3(310.81643f, -276.5641f, 55.81643f)); // -1340405475 prop_cctv_cam_07a
  254.  
  255. Teller_Walk_Locations1.Add(new Vector3(308.5f, -278.85f, 53.3f));
  256. Teller_Walk_Locations2.Add(new Vector3(307.7f, -281.3f, 53.3f));
  257.  
  258. Teller_Locations.Add(new Vector3(313.6f, -280.0f, 54.2f)); // teller a_m_y_business_01 a_m_y_busicas_01
  259. Teller_Heading.Add(-25.0f);
  260.  
  261. Hostage1_Locations.Add(new Vector3(318.3f, -278.65f, 52.65f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  262. Hostage1_Heading.Add(70.0f);
  263.  
  264. Hostage2_Locations.Add(new Vector3(311.5f, -274.9f, 52.65f));
  265. Hostage2_Heading.Add(-195.0f);
  266.  
  267. Hostage3_Locations.Add(new Vector3(314.4f, -278.6f, 53.2f));
  268. Hostage3_Heading.Add(-195.0f);
  269.  
  270. FleecaDoor_Locations.Add(new Vector3(309.7491f, -280.1797f, 54.43926f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  271. FleecaDoor_Heading.Add(249.866f);
  272.  
  273. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(311.35f, -284.45f, 54.0f));
  274.  
  275. FleecaVaultDoor_Locations.Add(new Vector3(312.358f, -282.73018f, 54.30365f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  276.  
  277. FleecaVaultDoor_Heading.Add(249.866f);
  278.  
  279. FleecaVaultDrill_Locations.Add(new Vector3(313.078f, -288.54f, 53.2f));
  280. FleecaVaultDrill_Heading.Add(160.0f);
  281.  
  282. FleecaVaultBoxWall_Locations.Add(new Vector3(312.39f, -289.35f, 54.38f));
  283. FleecaVaultBoxWall_Heading.Add(160.0f);
  284.  
  285. FleecaVaultBoxDoor_Locations.Add(new Vector3(312.928f, -289.339f, 55.539f));
  286. FleecaVaultBoxDoor_Heading.Add(160.0f);
  287.  
  288. ////// bank 5 grand senora
  289. Bank_Locations.Add(new Vector3(1175.4f, 2690.9f, 36.6f)); // green marker
  290.  
  291. EnterExitBank_Locations.Add(new Vector3(1175.2f, 2703.75f, 38.0f));
  292.  
  293. Cam1_Locations.Add(new Vector3(1171.454f, 2707.45f, 39.77259f)); // 168901740 prop_cctv_cam_06a coords for cams
  294. Cam2_Locations.Add(new Vector3(1181.537f, 2708.842f, 40.27802f));
  295. Cam3_Locations.Add(new Vector3(1181.537f, 2710.057f, 40.278f));
  296. Cam4_Locations.Add(new Vector3(1178.905f, 2710.62f, 40.06371f));
  297. Cam5_Locations.Add(new Vector3(1179.079f, 2705.591f, 39.73968f)); // -1340405475 prop_cctv_cam_07a
  298.  
  299. Teller_Walk_Locations1.Add(new Vector3(1180.4f, 2708.5f, 38.0f));
  300. Teller_Walk_Locations2.Add(new Vector3(1180.4f, 2711.2f, 38.0f));
  301.  
  302. Teller_Locations.Add(new Vector3(1175.0f, 2709.0f, 38.0f)); // teller a_m_y_business_01 a_m_y_busicas_01
  303. Teller_Heading.Add(180.0f);
  304.  
  305. Hostage1_Locations.Add(new Vector3(1171.4f, 2705.1f, 36.59f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  306. Hostage1_Heading.Add(-90.0f);
  307.  
  308. Hostage2_Locations.Add(new Vector3(1179.4f, 2703.8f, 36.59f));
  309. Hostage2_Heading.Add(.0f);
  310.  
  311. Hostage3_Locations.Add(new Vector3(1175.0f, 2706.5f, 37.145f));
  312. Hostage3_Heading.Add(.0f);
  313.  
  314. FleecaDoor_Locations.Add(new Vector3(1178.87f, 2709.365f, 38.36251f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  315. FleecaDoor_Heading.Add(90.0f);
  316.  
  317. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(1175.9f, 2712.8f, 38.0f));
  318.  
  319. FleecaVaultDoor_Locations.Add(new Vector3(1175.542f, 2710.861f, 38.22689f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  320.  
  321. FleecaVaultDoor_Heading.Add(90.0f);
  322.  
  323. FleecaVaultDrill_Locations.Add(new Vector3(1172.855f, 2716.1f, 37.14f));
  324. FleecaVaultDrill_Heading.Add(0.0f);
  325.  
  326. FleecaVaultBoxWall_Locations.Add(new Vector3(1173.23f, 2717.1f, 38.32f));
  327. FleecaVaultBoxWall_Heading.Add(0.0f);
  328.  
  329. FleecaVaultBoxDoor_Locations.Add(new Vector3(1172.725f, 2716.91f, 39.48f));
  330. FleecaVaultBoxDoor_Heading.Add(0.0f);
  331.  
  332.  
  333. ////// bank 6 Vespucci_Boulevard
  334. Bank_Locations.Add(new Vector3(153.2f, -1029.0f, 28.0f)); // green marker
  335.  
  336. EnterExitBank_Locations.Add(new Vector3(151.3f, -1036.6f, 29.0f));
  337.  
  338. Cam1_Locations.Add(new Vector3(153.1795f, -1042.05264f, 31.05264f)); // 168901740 prop_cctv_cam_06a coords for cams
  339. Cam2_Locations.Add(new Vector3(143.0941f, -1040.403f, 31.55806f));
  340. Cam3_Locations.Add(new Vector3(142.5754f, -1041.543f, 31.55805f));
  341. Cam4_Locations.Add(new Vector3(144.9529f, -1042.979f, 31.34375f));
  342. Cam5_Locations.Add(new Vector3(146.5221f, -1038.197f, 31.01972f)); // -1340405475 prop_cctv_cam_07a
  343.  
  344. Teller_Walk_Locations1.Add(new Vector3(144.7f, -1040.6f, 29.0f));
  345. Teller_Walk_Locations2.Add(new Vector3(143.3f, -1043.2f, 29.0f));
  346.  
  347. Teller_Locations.Add(new Vector3(149.7f, -1042.4f, 29.0f)); // teller a_m_y_business_01 a_m_y_busicas_01
  348. Teller_Heading.Add(0.0f);
  349.  
  350. Hostage1_Locations.Add(new Vector3(154.0f, -1040.3f, 27.85f)); // left seat Hostage1 a_m_y_stbla_01 a_m_y_stbla_02 a_f_y_tourist_02 a_f_y_tourist_01 a_m_m_stlat_02 a_m_y_genstreet_01 a_f_y_business_03
  351. Hostage1_Heading.Add(69.8462f);
  352.  
  353. Hostage2_Locations.Add(new Vector3(146.7f, -1036.5f, 27.85f));
  354. Hostage2_Heading.Add(159.8462f);
  355.  
  356. Hostage3_Locations.Add(new Vector3(150.0f, -1040.6f, 28.4f));
  357. Hostage3_Heading.Add(159.8462f);
  358.  
  359. FleecaDoor_Locations.Add(new Vector3(145.4186f, -1041.813f, 29.64255f)); // -131754413 v_ilev_gb_teldr heading 145.0371 fleeca door
  360. FleecaDoor_Heading.Add(249.8462f);
  361.  
  362. FleecaVaultDoor_KeyPad_Locations.Add(new Vector3(146.9f, -1046.0f, 29.0f));
  363.  
  364. FleecaVaultDoor_Locations.Add(new Vector3(148.0266f, -1044.364f, 29.50693f)); // 2121050683 v_ilev_gb_vauldr heading 357.5421 valt door
  365.  
  366. FleecaVaultDoor_Heading.Add(249.8462f);
  367.  
  368. FleecaVaultDrill_Locations.Add(new Vector3(148.748f, -1050.2f, 28.365f));
  369. FleecaVaultDrill_Heading.Add(159.8462f);
  370.  
  371. FleecaVaultBoxWall_Locations.Add(new Vector3(148.05f, -1051.0f, 29.55f));
  372. FleecaVaultBoxWall_Heading.Add(159.8462f);
  373.  
  374. FleecaVaultBoxDoor_Locations.Add(new Vector3(148.59f, -1051.0f, 30.70f));
  375. FleecaVaultBoxDoor_Heading.Add(159.8462f);
  376.  
  377. /////////////////////
  378.  
  379. KeysData = ScriptSettings.Load("scripts//RobFleeca.ini");
  380.  
  381. MinCash = KeysData.GetValue<int>("settings", "MinCash", 25000);
  382.  
  383. MaxCash = KeysData.GetValue<int>("settings", "MaxCash", 250000);
  384.  
  385. WantedLevel = KeysData.GetValue<int>("settings", "WantedLevel", 4);
  386.  
  387. ShowBlips = KeysData.GetValue<bool>("settings", "ShowBlips", false);
  388.  
  389. BankRobbed1 = KeysData.GetValue<bool>("settings", "BankRobbed1", false);
  390.  
  391. BankRobbed2 = KeysData.GetValue<bool>("settings", "BankRobbed2", false);
  392.  
  393. BankRobbed3 = KeysData.GetValue<bool>("settings", "BankRobbed3", false);
  394.  
  395. BankRobbed4 = KeysData.GetValue<bool>("settings", "BankRobbed4", false);
  396.  
  397. BankRobbed5 = KeysData.GetValue<bool>("settings", "BankRobbed5", false);
  398.  
  399. BankRobbed6 = KeysData.GetValue<bool>("settings", "BankRobbed6", false);
  400.  
  401.  
  402. Blip[] blips = World.GetActiveBlips();
  403.  
  404. if (blips.Count() > 0)
  405. {
  406. for (int i2 = 0; i2 < blips.Count(); i2++)
  407. {
  408. for (int i = 0; i < Bank_Locations.Count; i++)
  409. {
  410. if (blips[i2].Position == Bank_Locations[i])
  411. {
  412. blips[i2].Remove();
  413. }
  414. }
  415. }
  416. }
  417.  
  418. if (ShowBlips)
  419. {
  420. for (int i = 0; i < Bank_Locations.Count; i++)
  421. {
  422. Blip b = World.CreateBlip(Bank_Locations[i]);
  423. b.Sprite = BlipSprite.DollarSign;
  424. b.Color = BlipColor.Green;
  425. b.IsShortRange = true;
  426. b.Name = "Fleeca Banks";
  427. }
  428. }
  429.  
  430. Tick += OnTick;
  431. KeyUp += OnKeyUp;
  432.  
  433. }
  434.  
  435.  
  436. public void OnTick(object o, EventArgs e)
  437. {
  438.  
  439. //Prop[] tmppop = World.GetNearbyProps(Game.Player.Character.Position + Game.Player.Character.ForwardVector * 1 + Game.Player.Character.UpVector * .5f, 2.0f); // "prop_facgate_04_l","prop_facgate_04_r",
  440.  
  441. //if (tmppop.Count() > 0)
  442. //{
  443. // World.DrawMarker(MarkerType.UpsideDownCone, tmppop[0].Position, new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 180.0f, 0.0f), new Vector3(1.0f, 1.0f, 2.0f), Color.Red, true, true, 2, false, "", "", false);
  444.  
  445. // //UI.ShowSubtitle(tmppop[0].Model.Hash.ToString(), 10);
  446. // UI.ShowSubtitle(tmppop[0].Model.Hash.ToString() + " " + tmppop[0].Position.ToString() + " " + tmppop[0].Heading.ToString() + " " + tmppop[0].Health.ToString() + " " + Function.Call<int>(Hash.GET_ENTITY_LOD_DIST, tmppop[0].Handle).ToString(), 10);
  447.  
  448. // //Function.Call<string>(Hash._0x717E4D1F2048376D, tmppop[0].Handle);
  449. //}
  450.  
  451. //Ped tmpped = World.GetClosestPed(Game.Player.Character.Position + Game.Player.Character.ForwardVector * 3, 1.0f); // "prop_facgate_04_l","prop_facgate_04_r",
  452.  
  453. //if (tmpped != null)
  454. //{
  455. // World.DrawMarker(MarkerType.UpsideDownCone, tmpped.Position, new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 180.0f, 0.0f), new Vector3(1.0f, 1.0f, 2.0f), Color.Red, true, true, 2, false, "", "", false);
  456.  
  457. // //UI.ShowSubtitle(tmppop[0].Model.Hash.ToString(), 10);
  458. // UI.ShowSubtitle(tmpped.Model.Hash.ToString() + " " + tmpped.Position.ToString() + " " + tmpped.Heading.ToString() + " " + tmpped.Health.ToString() + " " + Function.Call<int>(Hash.GET_ENTITY_LOD_DIST, tmpped.Handle).ToString(), 10);
  459.  
  460. // //Function.Call<string>(Hash._0x717E4D1F2048376D, tmppop[0].Handle);
  461. //}
  462. //Game.Player.WantedLevel = 0;
  463.  
  464. if (Function.Call<bool>(Hash.IS_CONTROL_JUST_PRESSED, 2, 175)) // start if dpad left
  465. {
  466. if (Game.Player.WantedLevel < 1 && Robs.Count < 1 && Function.Call<int>(Hash.GET_CLOCK_HOURS) >= 7 && Function.Call<int>(Hash.GET_CLOCK_HOURS) < 18)
  467. {
  468. for (int i = 0; i < Bank_Locations.Count; i++)
  469. {
  470. if (Bank_Locations[i].DistanceTo(Game.Player.Character.Position) < 12.0f && BankAvalible[i] == true)
  471. {
  472. Rob rob = new Rob(i);
  473. Robs.Add(rob);
  474. }
  475. }
  476. }
  477. }
  478.  
  479. if (Robs.Count > 0)
  480. {
  481.  
  482. switch (Robs[0].Objective_Index)
  483. {
  484. case 0:
  485. {
  486. Function.Call(Hash.PLAY_SOUND_FRONTEND, Robs[0].Checkpoint_Sound, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", 1);
  487.  
  488. Ped p = World.GetClosestPed(Teller_Locations[Robs[0].List_Index], 1.0f);
  489.  
  490. if (p != null && p.IsDead != true)
  491. {
  492. Robs[0].Teller = p;
  493. p.IsPersistent = true;
  494. }
  495. else
  496. {
  497. int modelSelect = Function.Call<int>(Hash.GET_RANDOM_INT_IN_RANGE, 0, 100);
  498.  
  499. string mdl = "a_f_y_business_03";
  500.  
  501. if (modelSelect >= 50)
  502. {
  503. mdl = "a_f_y_business_02";
  504. }
  505. if (modelSelect > 50)
  506. {
  507. mdl = "a_m_y_business_02";
  508. }
  509.  
  510. var model = new Model(mdl);
  511. model.Request(250);
  512.  
  513. if (model.IsInCdImage && model.IsValid)
  514. {
  515. while (!model.IsLoaded) Script.Wait(50);
  516. Ped ped = World.CreatePed(model, Teller_Locations[Robs[0].List_Index], Teller_Heading[Robs[0].List_Index]);
  517. Robs[0].Teller = ped;
  518. ped.IsPersistent = true;
  519. ped.RandomizeOutfit();
  520. Function.Call(Hash.TASK_START_SCENARIO_AT_POSITION, ped, "WORLD_HUMAN_CLIPBOARD", Teller_Locations[Robs[0].List_Index].X, Teller_Locations[Robs[0].List_Index].Y, Teller_Locations[Robs[0].List_Index].Z, Teller_Heading[Robs[0].List_Index], -1, 0, 1);
  521. }
  522.  
  523. model.MarkAsNoLongerNeeded();
  524.  
  525. }
  526.  
  527. Ped Hostage1 = World.GetClosestPed(Hostage1_Locations[Robs[0].List_Index], 1.0f);
  528.  
  529. if (Hostage1 != null)
  530. {
  531. Robs[0].Hostage1 = Hostage1;
  532. Robs[0].Hostage1.CanBeTargetted = false;
  533. Hostage1.IsPersistent = true;
  534. }
  535. else
  536. {
  537. int modelSelect = Function.Call<int>(Hash.GET_RANDOM_INT_IN_RANGE, 1, 7);
  538.  
  539. string mdl = "a_m_y_stbla_01";
  540.  
  541. switch (modelSelect)
  542. {
  543. case 1:
  544. {
  545. mdl = "a_m_y_stbla_01";
  546. }
  547. break;
  548. case 2:
  549. {
  550. mdl = "a_m_y_stbla_02";
  551. }
  552. break;
  553. case 3:
  554. {
  555. mdl = "a_f_y_tourist_01";
  556. }
  557. break;
  558. case 4:
  559. {
  560. mdl = "a_f_y_tourist_02";
  561. }
  562. break;
  563. case 5:
  564. {
  565. mdl = "a_m_m_stlat_02";
  566. }
  567. break;
  568. case 6:
  569. {
  570. mdl = "a_m_y_genstreet_01";
  571. }
  572. break;
  573. case 7:
  574. {
  575. mdl = "a_f_y_business_03";
  576. }
  577. break;
  578. }
  579.  
  580. var model = new Model(mdl);
  581. model.Request(250);
  582.  
  583. if (model.IsInCdImage && model.IsValid)
  584. {
  585. while (!model.IsLoaded) Script.Wait(50);
  586. Ped ped = World.CreatePed(model, Hostage1_Locations[Robs[0].List_Index], Hostage1_Heading[Robs[0].List_Index]);
  587.  
  588. Function.Call(Hash.TASK_START_SCENARIO_AT_POSITION, ped, "PROP_HUMAN_SEAT_BENCH", ped.Position.X, ped.Position.Y, ped.Position.Z, Hostage1_Heading[Robs[0].List_Index], -1, 1, 0);
  589.  
  590. Robs[0].Hostage1 = ped;
  591. Robs[0].Hostage1.CanBeTargetted = false;
  592.  
  593. ped.IsPersistent = true;
  594. ped.RandomizeOutfit();
  595. }
  596.  
  597. model.MarkAsNoLongerNeeded();
  598.  
  599. }
  600.  
  601. Ped Hostage2 = World.GetClosestPed(Hostage2_Locations[Robs[0].List_Index], 1.0f);
  602.  
  603. if (Hostage2 != null)
  604. {
  605. Robs[0].Hostage2 = Hostage2;
  606. Robs[0].Hostage2.CanBeTargetted = false;
  607.  
  608. Hostage2.IsPersistent = true;
  609. }
  610. else
  611. {
  612. int modelSelect = Function.Call<int>(Hash.GET_RANDOM_INT_IN_RANGE, 1, 7);
  613.  
  614. string mdl = "a_m_y_stbla_01";
  615.  
  616. switch (modelSelect)
  617. {
  618. case 1:
  619. {
  620. mdl = "a_m_y_stbla_01";
  621. }
  622. break;
  623. case 2:
  624. {
  625. mdl = "a_m_y_stbla_02";
  626. }
  627. break;
  628. case 3:
  629. {
  630. mdl = "a_f_y_tourist_01";
  631. }
  632. break;
  633. case 4:
  634. {
  635. mdl = "a_f_y_tourist_02";
  636. }
  637. break;
  638. case 5:
  639. {
  640. mdl = "a_m_m_stlat_02";
  641. }
  642. break;
  643. case 6:
  644. {
  645. mdl = "a_m_y_genstreet_01";
  646. }
  647. break;
  648. case 7:
  649. {
  650. mdl = "a_f_y_business_03";
  651. }
  652. break;
  653. }
  654.  
  655. var model = new Model(mdl);
  656. model.Request(250);
  657.  
  658. if (model.IsInCdImage && model.IsValid)
  659. {
  660. while (!model.IsLoaded) Script.Wait(50);
  661. Ped ped = World.CreatePed(model, Hostage2_Locations[Robs[0].List_Index], Hostage2_Heading[Robs[0].List_Index]);
  662.  
  663. Function.Call(Hash.TASK_START_SCENARIO_AT_POSITION, ped, "PROP_HUMAN_SEAT_BENCH", ped.Position.X, ped.Position.Y, ped.Position.Z, Hostage2_Heading[Robs[0].List_Index], -1, 1, 0);
  664.  
  665. Robs[0].Hostage2 = ped;
  666.  
  667. Robs[0].Hostage2.CanBeTargetted = false;
  668.  
  669. ped.IsPersistent = true;
  670. ped.RandomizeOutfit();
  671. }
  672.  
  673. model.MarkAsNoLongerNeeded();
  674.  
  675. }
  676.  
  677. Ped Hostage3 = World.GetClosestPed(Hostage3_Locations[Robs[0].List_Index], 1.0f);
  678.  
  679. if (Hostage3 != null)
  680. {
  681. Robs[0].Hostage3 = Hostage3;
  682. Robs[0].Hostage3.CanBeTargetted = false;
  683.  
  684. Hostage3.IsPersistent = true;
  685. }
  686. else
  687. {
  688. int modelSelect = Function.Call<int>(Hash.GET_RANDOM_INT_IN_RANGE, 1, 7);
  689.  
  690. string mdl = "a_m_y_stbla_01";
  691.  
  692. switch (modelSelect)
  693. {
  694. case 1:
  695. {
  696. mdl = "a_m_y_stbla_01";
  697. }
  698. break;
  699. case 2:
  700. {
  701. mdl = "a_m_y_stbla_02";
  702. }
  703. break;
  704. case 3:
  705. {
  706. mdl = "a_f_y_tourist_01";
  707. }
  708. break;
  709. case 4:
  710. {
  711. mdl = "a_f_y_tourist_02";
  712. }
  713. break;
  714. case 5:
  715. {
  716. mdl = "a_m_m_stlat_02";
  717. }
  718. break;
  719. case 6:
  720. {
  721. mdl = "a_m_y_genstreet_01";
  722. }
  723. break;
  724. case 7:
  725. {
  726. mdl = "a_f_y_business_03";
  727. }
  728. break;
  729. }
  730.  
  731. var model = new Model(mdl);
  732. model.Request(250);
  733.  
  734. if (model.IsInCdImage && model.IsValid)
  735. {
  736. while (!model.IsLoaded) Script.Wait(50);
  737. Ped ped = World.CreatePed(model, Hostage3_Locations[Robs[0].List_Index], Hostage3_Heading[Robs[0].List_Index]);
  738.  
  739. Function.Call(Hash.TASK_START_SCENARIO_AT_POSITION, ped, "PROP_HUMAN_STAND_IMPATIENT", ped.Position.X, ped.Position.Y, ped.Position.Z, Hostage3_Heading[Robs[0].List_Index], -1, 0, 0);
  740.  
  741. Robs[0].Hostage3 = ped;
  742. Robs[0].Hostage3.CanBeTargetted = false;
  743.  
  744. ped.IsPersistent = true;
  745. ped.RandomizeOutfit();
  746. }
  747.  
  748. model.MarkAsNoLongerNeeded();
  749.  
  750. }
  751. Prop[] prop = World.GetNearbyProps(Cam1_Locations[Robs[0].List_Index], 0.5f);
  752. if (prop.Count() > 0)
  753. {
  754. for (int i = 0; i < prop.Count(); i++)
  755. {
  756. if (prop[i].Model == 168901740 || prop[i].Model == -1340405475 || prop[i].Model == -1007354661 || prop[i].Model == -1842407088)
  757. {
  758. Robs[0].Cam1 = prop[i];
  759. Robs[0].Cam1.AddBlip();
  760. Robs[0].Cam1.CurrentBlip.Color = BlipColor.Red;
  761. Robs[0].Cam1.CurrentBlip.IsFlashing = false;
  762. Robs[0].Cam1.CurrentBlip.Scale = .65f;
  763. }
  764. }
  765. }
  766.  
  767. Prop[] prop2 = World.GetNearbyProps(Cam2_Locations[Robs[0].List_Index], 0.5f);
  768. if (prop2.Count() > 0)
  769. {
  770. for (int i = 0; i < prop2.Count(); i++)
  771. {
  772. if (prop2[i].Model == 168901740 || prop2[i].Model == -1340405475 || prop[i].Model == -1007354661 || prop[i].Model == -1842407088)
  773. {
  774. Robs[0].Cam2 = prop2[i];
  775. Robs[0].Cam2.AddBlip();
  776. Robs[0].Cam2.CurrentBlip.Color = BlipColor.Red;
  777. Robs[0].Cam2.CurrentBlip.IsFlashing = false;
  778. Robs[0].Cam2.CurrentBlip.Scale = .65f;
  779. }
  780. }
  781. }
  782.  
  783. Prop[] prop3 = World.GetNearbyProps(Cam3_Locations[Robs[0].List_Index], 0.5f);
  784. if (prop3.Count() > 0)
  785. {
  786. for (int i = 0; i < prop3.Count(); i++)
  787. {
  788. if (prop3[i].Model == 168901740 || prop3[i].Model == -1340405475 || prop[i].Model == -1007354661 || prop[i].Model == -1842407088)
  789. {
  790. Robs[0].Cam3 = prop3[i];
  791. Robs[0].Cam3.AddBlip();
  792. Robs[0].Cam3.CurrentBlip.Color = BlipColor.Red;
  793. Robs[0].Cam3.CurrentBlip.IsFlashing = false;
  794. Robs[0].Cam3.CurrentBlip.Scale = .65f;
  795. }
  796. }
  797. }
  798.  
  799. Prop[] prop4 = World.GetNearbyProps(Cam4_Locations[Robs[0].List_Index], 0.5f);
  800. if (prop4.Count() > 0)
  801. {
  802. for (int i = 0; i < prop4.Count(); i++)
  803. {
  804. if (prop4[i].Model == 168901740 || prop4[i].Model == -1340405475 || prop[i].Model == -1007354661 || prop[i].Model == -1842407088)
  805. {
  806. Robs[0].Cam4 = prop4[i];
  807. Robs[0].Cam4.AddBlip();
  808. Robs[0].Cam4.CurrentBlip.Color = BlipColor.Red;
  809. Robs[0].Cam4.CurrentBlip.IsFlashing = false;
  810. Robs[0].Cam4.CurrentBlip.Scale = .65f;
  811. }
  812. }
  813. }
  814.  
  815. Prop[] prop5 = World.GetNearbyProps(Cam5_Locations[Robs[0].List_Index], 0.5f);
  816. if (prop5.Count() > 0)
  817. {
  818. for (int i = 0; i < prop5.Count(); i++)
  819. {
  820. if (prop5[i].Model == 168901740 || prop5[i].Model == -1340405475 || prop[i].Model == -1007354661 || prop[i].Model == -1842407088)
  821. {
  822. Robs[0].Cam5 = prop5[i];
  823. Robs[0].Cam5.AddBlip();
  824. Robs[0].Cam5.CurrentBlip.Color = BlipColor.Red;
  825. Robs[0].Cam5.CurrentBlip.IsFlashing = false;
  826. Robs[0].Cam5.CurrentBlip.Scale = .65f;
  827. }
  828. }
  829. }
  830.  
  831. Prop[] prop6 = World.GetNearbyProps(FleecaDoor_Locations[Robs[0].List_Index], 0.5f);
  832. if (prop6.Count() > 0)
  833. {
  834. for (int i = 0; i < prop6.Count(); i++)
  835. {
  836. if (prop6[i].Model == -131754413)
  837. {
  838. prop6[i].Heading = FleecaDoor_Heading[Robs[0].List_Index];
  839. }
  840. }
  841. }
  842.  
  843. Prop[] prop8 = World.GetNearbyProps(FleecaVaultDoor_Locations[Robs[0].List_Index], 1.5f);
  844. if (prop8.Count() > 0)
  845. {
  846. for (int i = 0; i < prop8.Count(); i++)
  847. {
  848. if (prop8[i].Model == 2121050683 || prop8[i].Model == -63539571)
  849. {
  850. prop8[i].Delete();
  851.  
  852. }
  853. }
  854. }
  855. var modelv = new Model("hei_prop_heist_sec_door"); //
  856. modelv.Request(250);
  857. if (modelv.IsInCdImage && modelv.IsValid)
  858. {
  859. while (!modelv.IsLoaded) Script.Wait(50);
  860. Prop door = World.CreateProp(modelv, new Vector3(FleecaVaultDoor_Locations[Robs[0].List_Index].X, FleecaVaultDoor_Locations[Robs[0].List_Index].Y, FleecaVaultDoor_Locations[Robs[0].List_Index].Z - 1.2f), new Vector3(0.0f, 0.0f, FleecaVaultDoor_Heading[Robs[0].List_Index]), true, false);
  861. door.FreezePosition = true;
  862. }
  863.  
  864. modelv.MarkAsNoLongerNeeded();
  865.  
  866. Prop[] prop9 = World.GetNearbyProps(FleecaVaultBoxWall_Locations[Robs[0].List_Index], 1.0f);
  867. if (prop9.Count() > 0)
  868. {
  869. for (int i = 0; i < prop9.Count(); i++)
  870. {
  871. if (prop9[i].Model == 152330975)
  872. {
  873. prop9[i].Delete();
  874. }
  875. }
  876. }
  877. var modelWall = new Model("hei_prop_heist_safedeposit"); //
  878. modelWall.Request(250);
  879. if (modelWall.IsInCdImage && modelWall.IsValid)
  880. {
  881. while (!modelWall.IsLoaded) Script.Wait(50);
  882. Prop wall = World.CreateProp(modelWall, new Vector3(FleecaVaultBoxWall_Locations[Robs[0].List_Index].X, FleecaVaultBoxWall_Locations[Robs[0].List_Index].Y, FleecaVaultBoxWall_Locations[Robs[0].List_Index].Z - 1.2f), new Vector3(0.0f, 0.0f, FleecaVaultBoxWall_Heading[Robs[0].List_Index]), true, false);
  883. Robs[0].BoxWall = wall;
  884. wall.FreezePosition = true;
  885. }
  886.  
  887. modelWall.MarkAsNoLongerNeeded();
  888.  
  889. Prop[] prop10 = World.GetNearbyProps(FleecaVaultBoxDoor_Locations[Robs[0].List_Index], 1.5f);
  890. if (prop10.Count() > 0)
  891. {
  892. for (int i = 0; i < prop10.Count(); i++)
  893. {
  894. if (prop10[i].Model == -812777085)
  895. {
  896. prop10[i].Delete();
  897. }
  898. }
  899. }
  900. var modelDoor = new Model("hei_prop_heist_safedepdoor"); //
  901. modelDoor.Request(250);
  902. if (modelDoor.IsInCdImage && modelDoor.IsValid)
  903. {
  904. while (!modelDoor.IsLoaded) Script.Wait(50);
  905. Prop door = World.CreateProp(modelDoor, new Vector3(FleecaVaultBoxDoor_Locations[Robs[0].List_Index].X, FleecaVaultBoxDoor_Locations[Robs[0].List_Index].Y, FleecaVaultBoxDoor_Locations[Robs[0].List_Index].Z - 1.2f), new Vector3(0.0f, 0.0f, FleecaVaultBoxDoor_Heading[Robs[0].List_Index]), true, false);
  906. Robs[0].BoxDoor = door;
  907. door.FreezePosition = true;
  908. }
  909.  
  910. modelDoor.MarkAsNoLongerNeeded();
  911.  
  912. Prop[] prop11 = World.GetNearbyProps(FleecaVaultBoxDoor_Locations[Robs[0].List_Index], 1.5f);
  913. if (prop11.Count() > 0)
  914. {
  915. for (int i = 0; i < prop11.Count(); i++)
  916. {
  917. if (prop11[i].Model == 264881854)
  918. {
  919. prop11[i].Delete();
  920. }
  921. }
  922. }
  923. var modelenvelope = new Model("p_cash_envelope_01_s"); //
  924. modelenvelope.Request(250);
  925. if (modelenvelope.IsInCdImage && modelenvelope.IsValid)
  926. {
  927. while (!modelenvelope.IsLoaded) Script.Wait(50);
  928. Prop envelope = World.CreateProp(modelenvelope, Robs[0].BoxDoor.Position + Robs[0].BoxDoor.ForwardVector * +.12f + Robs[0].BoxDoor.RightVector * +.15f + Robs[0].BoxDoor.UpVector * -.1f, new Vector3(90.0f, 45.0f, Robs[0].BoxDoor.Heading), true, false);
  929. Robs[0].CashEnvelope = envelope;
  930. envelope.FreezePosition = true;
  931. }
  932.  
  933. modelenvelope.MarkAsNoLongerNeeded();
  934.  
  935. UI.ShowSubtitle("Shoot the ~y~Cameras.", 30000);
  936.  
  937. Robs[0].Objective_Index = 1;
  938.  
  939.  
  940. }
  941. break;
  942. case 1:
  943. {
  944. UI.ShowSubtitle("Shoot the ~y~Cameras.", 1000);
  945.  
  946. if (Robs[0].Cam1 != null && Robs[0].Cam1.Health < 900)
  947. {
  948. Robs[0].Cam1.CurrentBlip.Remove();
  949. Robs[0].Cam1.MarkAsNoLongerNeeded();
  950. }
  951.  
  952. if (Robs[0].Cam2 != null && Robs[0].Cam2.Health < 900)
  953. {
  954. Robs[0].Cam2.CurrentBlip.Remove();
  955. Robs[0].Cam2.MarkAsNoLongerNeeded();
  956. }
  957. if (Robs[0].Cam3 != null && Robs[0].Cam3.Health < 900)
  958. {
  959. Robs[0].Cam3.CurrentBlip.Remove();
  960. Robs[0].Cam3.MarkAsNoLongerNeeded();
  961. }
  962. if (Robs[0].Cam4 != null && Robs[0].Cam4.Health < 900)
  963. {
  964. Robs[0].Cam4.CurrentBlip.Remove();
  965. Robs[0].Cam4.MarkAsNoLongerNeeded();
  966. }
  967. if (Robs[0].Cam5 != null && Robs[0].Cam5.Health < 900)
  968. {
  969. Robs[0].Cam5.CurrentBlip.Remove();
  970. Robs[0].Cam5.MarkAsNoLongerNeeded();
  971. }
  972.  
  973. if (Robs[0].Cam1 != null && Robs[0].Cam2 != null && Robs[0].Cam3 != null && Robs[0].Cam4 != null && Robs[0].Cam5 != null &&
  974. Robs[0].Cam1.Health < 900 && Robs[0].Cam2.Health < 900 && Robs[0].Cam3.Health < 900 && Robs[0].Cam4.Health < 900 && Robs[0].Cam5.Health < 900)
  975. {
  976. Robs[0].Objective_Index = 2;
  977. Robs[0].Teller.AddBlip();
  978. Robs[0].Teller.CurrentBlip.Color = BlipColor.Blue;
  979. Robs[0].Teller.CurrentBlip.Scale = .75f;
  980. Function.Call(Hash.PLAY_SOUND_FRONTEND, Robs[0].Checkpoint_Sound, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", 1);
  981. }
  982.  
  983. if (Robs[0].Cam1 == null || Robs[0].Cam2 == null && Robs[0].Cam3 == null || Robs[0].Cam4 == null | Robs[0].Cam5 == null ||
  984. Robs[0].Cam1.Health < 900 || Robs[0].Cam2.Health < 900 || Robs[0].Cam3.Health < 900 || Robs[0].Cam4.Health < 900 || Robs[0].Cam5.Health < 900)
  985. {
  986.  
  987. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 2);
  988. //Game.Player.WantedLevel = 0;
  989.  
  990. if (!Robs[0].TellerCower)
  991. {
  992. Robs[0].TellerCower = true;
  993.  
  994. Function.Call(Hash.SET_PED_COWER_HASH, Robs[0].Teller, "CODE_HUMAN_STAND_COWER");
  995.  
  996. Robs[0].Teller.Task.Cower(-1);
  997. }
  998.  
  999. if (!Robs[0].Hostage3Cower)
  1000. {
  1001. Robs[0].Hostage3Cower = true;
  1002.  
  1003. Robs[0].Hostage3.Task.ClearAllImmediately();
  1004.  
  1005. Function.Call(Hash.SET_PED_COWER_HASH, Robs[0].Hostage3, "CODE_HUMAN_STAND_COWER");
  1006.  
  1007. Robs[0].Hostage3.Task.Cower(-1);
  1008. }
  1009. }
  1010.  
  1011. if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING_AT_ENTITY, Game.Player, Robs[0].Teller) && !Robs[0].TellerCower)
  1012. {
  1013. Robs[0].TellerCower = true;
  1014.  
  1015. Function.Call(Hash.SET_PED_COWER_HASH, Robs[0].Teller, "CODE_HUMAN_STAND_COWER");
  1016.  
  1017. Robs[0].Teller.Task.Cower(-1);
  1018. }
  1019.  
  1020. if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING_AT_ENTITY, Game.Player, Robs[0].Hostage3) && !Robs[0].Hostage3Cower)
  1021. {
  1022. Robs[0].Hostage3Cower = true;
  1023.  
  1024. Function.Call(Hash.SET_PED_COWER_HASH, Robs[0].Hostage3, "CODE_HUMAN_STAND_COWER");
  1025.  
  1026. Robs[0].Hostage3.Task.Cower(-1);
  1027. }
  1028.  
  1029.  
  1030. }
  1031. break;
  1032. case 2:
  1033. {
  1034. Function.Call(Hash.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS, Robs[0].Teller, true);
  1035.  
  1036. if (Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING_AT_ENTITY, Game.Player, Robs[0].Teller))
  1037. {
  1038. Function.Call(Hash.PLAY_SOUND_FRONTEND, Robs[0].Checkpoint_Sound, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", 1);
  1039.  
  1040. Robs[0].Teller.Task.ClearAllImmediately();
  1041.  
  1042. Robs[0].Objective_Index = 3;
  1043. }
  1044.  
  1045. UI.ShowSubtitle("Intiminate the ~b~teller.", 30000);
  1046.  
  1047. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 2);
  1048.  
  1049. Game.Player.WantedLevel = 0;
  1050.  
  1051. }
  1052. break;
  1053. case 3:
  1054. {
  1055. Function.Call(Hash.SET_PED_COWER_HASH, Robs[0].Teller, "CODE_HUMAN_COWER");
  1056.  
  1057. unsafe
  1058. {
  1059. int seq = 0;
  1060. GTA.Native.Function.Call(Hash.OPEN_SEQUENCE_TASK, &seq);
  1061.  
  1062. Function.Call(Hash.TASK_PLAY_ANIM, 0, "ped", "handsup", 4.0f, .0f, -1, 49, .0f, 0, 0, 0);
  1063.  
  1064. Function.Call(Hash.TASK_GO_STRAIGHT_TO_COORD, 0, Teller_Walk_Locations1[Robs[0].List_Index].X, Teller_Walk_Locations1[Robs[0].List_Index].Y, Teller_Walk_Locations1[Robs[0].List_Index].Z, 1.0f, -1, Teller_Heading[Robs[0].List_Index] + 100.0f, -.1f);
  1065. Function.Call(Hash.TASK_GO_STRAIGHT_TO_COORD, 0, Teller_Walk_Locations2[Robs[0].List_Index].X, Teller_Walk_Locations2[Robs[0].List_Index].Y, Teller_Walk_Locations2[Robs[0].List_Index].Z, 1.0f, -1, Teller_Heading[Robs[0].List_Index] - 100.0f, -.1f);
  1066. Function.Call(Hash.TASK_GO_STRAIGHT_TO_COORD, 0, FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].X, FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].Y, FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].Z, 1.2f, -1, Teller_Heading[Robs[0].List_Index] - 90.0f, -.1f);
  1067.  
  1068. GTA.Native.Function.Call(Hash.SET_SEQUENCE_TO_REPEAT, seq, false);
  1069. GTA.Native.Function.Call(Hash.CLOSE_SEQUENCE_TASK, seq);
  1070. GTA.Native.Function.Call(Hash.TASK_PERFORM_SEQUENCE, Robs[0].Teller, seq);
  1071. GTA.Native.Function.Call(Hash.CLEAR_SEQUENCE_TASK, &seq);
  1072.  
  1073. Robs[0].Teller.AlwaysKeepTask = true;
  1074.  
  1075. }
  1076.  
  1077. Robs[0].Objective_Index = 4;
  1078.  
  1079. }
  1080. break;
  1081. case 4:
  1082. {
  1083.  
  1084. if (!Robs[0].Teller_Door_Open)
  1085. {
  1086. if (Robs[0].Teller.Position.DistanceTo(FleecaDoor_Locations[Robs[0].List_Index]) < 1.2f)
  1087. {
  1088. Prop[] prop = World.GetNearbyProps(FleecaDoor_Locations[Robs[0].List_Index], 0.5f);
  1089. if (prop.Count() > 0)
  1090. {
  1091. for (int i = 0; i < prop.Count(); i++)
  1092. {
  1093. if (prop[i].Model == -131754413)
  1094. {
  1095. prop[i].Heading = FleecaDoor_Heading[Robs[0].List_Index] + 90.0f;
  1096. Robs[0].Teller_Door_Open = true;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. }
  1102.  
  1103. if (Robs[0].Teller.Position.DistanceTo(FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index]) < .5f)
  1104. {
  1105. Robs[0].Objective_Index = 5;
  1106. if (Robs[0].Teller.CurrentBlip != null)
  1107. {
  1108. Robs[0].Teller.CurrentBlip.Remove();
  1109. }
  1110. }
  1111.  
  1112. UI.ShowSubtitle("Follow the ~b~teller ~w~to the ~y~vault.", 30000);
  1113.  
  1114. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 2);
  1115.  
  1116. Game.Player.WantedLevel = 0;
  1117.  
  1118. }
  1119. break;
  1120. case 5:
  1121. {
  1122. Robs[0].Teller.Task.ClearAllImmediately();
  1123.  
  1124. unsafe
  1125. {
  1126. int seq = 0;
  1127. GTA.Native.Function.Call(Hash.OPEN_SEQUENCE_TASK, &seq);
  1128. Function.Call(Hash.TASK_ACHIEVE_HEADING, 0, Teller_Heading[Robs[0].List_Index] - 95.0f, 1000);
  1129.  
  1130. Function.Call(Hash.TASK_PLAY_ANIM, 0, "amb@prop_human_atm@female@idle_a", "idle_b", 4.0f, 1.0f, 1100, 0, .0f, 0, 0, 0);
  1131. Function.Call(Hash.TASK_PLAY_ANIM, 0, "amb@prop_human_atm@female@idle_a", "idle_b", 4.0f, 1.0f, 1300, 0, .0f, 0, 0, 0);
  1132. Function.Call(Hash.TASK_PLAY_ANIM, 0, "amb@prop_human_atm@female@idle_a", "idle_b", 1.0f, 1.0f, 1100, 0, .0f, 0, 0, 0);
  1133. Function.Call(Hash.TASK_PLAY_ANIM, 0, "amb@prop_human_atm@female@idle_a", "idle_b", 1.0f, 1.0f, 1100, 0, .0f, 0, 0, 0);
  1134.  
  1135. GTA.Native.Function.Call(Hash.SET_SEQUENCE_TO_REPEAT, seq, false);
  1136. GTA.Native.Function.Call(Hash.CLOSE_SEQUENCE_TASK, seq);
  1137. GTA.Native.Function.Call(Hash.TASK_PERFORM_SEQUENCE, Robs[0].Teller, seq);
  1138. GTA.Native.Function.Call(Hash.CLEAR_SEQUENCE_TASK, &seq);
  1139. Robs[0].Teller.AlwaysKeepTask = true;
  1140. Robs[0].Objective_Index = 6;
  1141. UI.ShowSubtitle("Wait for the ~b~Teller ~w~to open the ~y~vault.", 5000);
  1142. }
  1143.  
  1144. }
  1145. break;
  1146.  
  1147. case 6:
  1148. {
  1149. while (Function.Call<int>(Hash.GET_SEQUENCE_PROGRESS, Robs[0].Teller) != -1)
  1150. {
  1151. Wait(500);
  1152. if (Function.Call<int>(Hash.GET_SEQUENCE_PROGRESS, Robs[0].Teller) == 0)
  1153. {
  1154. Robs[0].Teller.FreezePosition = true;
  1155. }
  1156. }
  1157.  
  1158. Robs[0].Teller.FreezePosition = false;
  1159.  
  1160. Robs[0].Objective_Index = 7;
  1161.  
  1162. if (Robs[0].Objective_Index > -1 && Robs[0].Objective_Index < 8 && Robs[0].Teller.IsAlive == false && Robs[0].Faild == false)
  1163. {
  1164. Function.Call(Hash.PLAY_SOUND_FRONTEND, -1, "ScreenFlash", "MissionFailedSounds", 1);
  1165.  
  1166. Function.Call(Hash.PLAY_MISSION_COMPLETE_AUDIO, "GENERIC_FAILED");
  1167.  
  1168. WhoDied = "The ~b~Teller ";
  1169.  
  1170. BankAvalible[Robs[0].List_Index] = false;
  1171.  
  1172. Robs[0].Faild = true;
  1173.  
  1174. run = true;
  1175. step = 0;
  1176.  
  1177. Robs[0].Objective_Index = -1;
  1178.  
  1179. }
  1180.  
  1181. }
  1182. break;
  1183. case 7:
  1184. {
  1185. Function.Call(Hash.PLAY_SOUND_FROM_COORD, Robs[0].Vault_Sound, "vault_unlock", FleecaVaultDoor_Locations[Robs[0].List_Index].X, FleecaVaultDoor_Locations[Robs[0].List_Index].Y, FleecaVaultDoor_Locations[Robs[0].List_Index].Z, "dlc_heist_fleeca_bank_door_sounds", 0, 0, 0);
  1186.  
  1187. Prop[] prop = World.GetNearbyProps(new Vector3(FleecaVaultDoor_Locations[Robs[0].List_Index].X, FleecaVaultDoor_Locations[Robs[0].List_Index].Y, FleecaVaultDoor_Locations[Robs[0].List_Index].Z - 1.2f), 1.5f);
  1188.  
  1189. if (prop.Count() > 0)
  1190. {
  1191. for (int i = 0; i < prop.Count(); i++)
  1192. {
  1193. if (prop[i].Model == -63539571)
  1194. {
  1195. prop[i].FreezePosition = false;
  1196.  
  1197. Function.Call(Hash.PLAY_ENTITY_ANIM, prop[i], "bank_vault_door_opens", "anim@heists@fleeca_bank@bank_vault_door", 4.0f, 0, 1, 0, 0f, 8);
  1198.  
  1199. prop[i].HasCollision = false;
  1200. Wait(1000);
  1201. Function.Call(Hash.PLAY_SOUND_FROM_COORD, Robs[0].Alarm_Sound, "Burglar_Bell", FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].X, FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].Y, FleecaVaultDoor_KeyPad_Locations[Robs[0].List_Index].Z, "Generic_Alarms", 0, 0, 0);
  1202.  
  1203. prop[i].FreezePosition = false;
  1204.  
  1205. prop[i].MarkAsNoLongerNeeded();
  1206.  
  1207. }
  1208. }
  1209. }
  1210.  
  1211. Robs[0].Teller.Task.Cower(-1);
  1212.  
  1213. UI.ShowSubtitle("~g~Go ~w~to the ~y~deposit box.", 000);
  1214.  
  1215. Robs[0].Objective_Index = 8;
  1216.  
  1217. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 2);
  1218.  
  1219. Game.Player.WantedLevel = 0;
  1220.  
  1221. }
  1222. break;
  1223.  
  1224.  
  1225. case 8:
  1226. {
  1227. if (!Robs[0].Vault_Door_Open)
  1228. {
  1229. Robs[0].Vault_Door_Open = true;
  1230. Robs[0].Objective_Index = 9;
  1231. }
  1232. }
  1233. break;
  1234. case 9:
  1235. {
  1236. Blip blip = Function.Call<Blip>(Hash.ADD_BLIP_FOR_COORD, FleecaVaultDrill_Locations[Robs[0].List_Index].X, FleecaVaultDrill_Locations[Robs[0].List_Index].Y, FleecaVaultDrill_Locations[Robs[0].List_Index].Z);
  1237. Robs[0].Drill_LocationBlip = blip;
  1238. Robs[0].Drill_LocationBlip.Scale = .75f;
  1239. Robs[0].Objective_Index = 10;
  1240. }
  1241. break;
  1242. case 10:
  1243. {
  1244. UI.ShowSubtitle("~g~Go ~w~to the ~y~deposit box.", 000);
  1245.  
  1246. World.DrawMarker(MarkerType.VerticalCylinder, FleecaVaultDrill_Locations[Robs[0].List_Index], new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(.5f, .5f, 0.5f), Color.FromArgb(255, 255, 0), false, true, 2, false, "", "", false);
  1247.  
  1248. if (Game.Player.Character.Position.DistanceTo(FleecaVaultDrill_Locations[Robs[0].List_Index]) < 1.5f)
  1249. {
  1250. bool D_Pad_Right = Function.Call<bool>(Hash.IS_DISABLED_CONTROL_PRESSED, 2, 75);
  1251. bool key_Right = Function.Call<bool>(Hash.IS_DISABLED_CONTROL_PRESSED, 2, 175);
  1252.  
  1253. DisplayHelpTextThisFrame("~INPUT_FRONTEND_RIGHT~ to dril deposit box");
  1254. if (D_Pad_Right || key_Right)
  1255. {
  1256. Robs[0].Objective_Index = 11;
  1257. }
  1258. }
  1259.  
  1260. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, WantedLevel);
  1261.  
  1262. Game.Player.WantedLevel = 0;
  1263.  
  1264. }
  1265. break;
  1266. case 11:
  1267. {
  1268. if (Drill == null || Drill.Drilling == false)
  1269. {
  1270. if (Robs[0].Drill_LocationBlip != null)
  1271. {
  1272. Robs[0].Drill_LocationBlip.Remove();
  1273. }
  1274.  
  1275. Game.Player.Character.FreezePosition = true;
  1276.  
  1277. Driller rob = new Driller();
  1278. Drill = rob;
  1279.  
  1280. Drill.CamMode = Function.Call<int>(Hash.GET_FOLLOW_PED_CAM_VIEW_MODE);
  1281.  
  1282. Function.Call(Hash.SET_FOLLOW_PED_CAM_VIEW_MODE, 1);
  1283.  
  1284. Game.Player.Character.Position = FleecaVaultDrill_Locations[Robs[0].List_Index];
  1285. Game.Player.Character.Heading = FleecaVaultDrill_Heading[Robs[0].List_Index];
  1286.  
  1287. Game.Player.Character.FreezePosition = true;
  1288.  
  1289. Function.Call(Hash.SET_FOLLOW_PED_CAM_VIEW_MODE, Drill.CamMode);
  1290.  
  1291. Robs[0].Objective_Index = 12;
  1292. }
  1293.  
  1294. }
  1295. break;
  1296. case 12:
  1297. {
  1298. bool D_Pad_Right = Function.Call<bool>(Hash.IS_DISABLED_CONTROL_PRESSED, 2, 74);
  1299. bool key_Right = Function.Call<bool>(Hash.IS_DISABLED_CONTROL_PRESSED, 2, 174);
  1300.  
  1301. DisplayHelpTextThisFrame("~INPUT_FRONTEND_LEFT~ to quit drilling");
  1302.  
  1303. if (key_Right)
  1304. {
  1305. if (Drill.Drilling)
  1306. {
  1307. Drill.RemoveDriller();
  1308.  
  1309. if (Robs[0].Drill_LocationBlip.Exists() == false)
  1310. {
  1311. Game.Player.Character.FreezePosition = false;
  1312.  
  1313. Blip blip = Function.Call<Blip>(Hash.ADD_BLIP_FOR_COORD, FleecaVaultDrill_Locations[Robs[0].List_Index].X, FleecaVaultDrill_Locations[Robs[0].List_Index].Y, FleecaVaultDrill_Locations[Robs[0].List_Index].Z);
  1314. Robs[0].Drill_LocationBlip = blip;
  1315. }
  1316. }
  1317.  
  1318. Robs[0].Objective_Index = 10;
  1319.  
  1320. }
  1321.  
  1322. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, WantedLevel);
  1323.  
  1324. Game.Player.WantedLevel = 0;
  1325.  
  1326. if (Robs[0].Drilling_Done)
  1327. {
  1328. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 0);
  1329. if (Game.Player.WantedLevel <= WantedLevel)
  1330. {
  1331. Game.Player.WantedLevel = WantedLevel;
  1332.  
  1333. }
  1334. unsafe
  1335. {
  1336. int seq = 0;
  1337. GTA.Native.Function.Call(Hash.OPEN_SEQUENCE_TASK, &seq);
  1338. Function.Call(Hash.TASK_PLAY_ANIM, 0, "anim@heists@fleeca_bank@drilling", "outro", 1.0f, .01f, 10000, 0, .0f, 1, 1, 1);
  1339. GTA.Native.Function.Call(Hash.SET_SEQUENCE_TO_REPEAT, seq, false);
  1340. GTA.Native.Function.Call(Hash.CLOSE_SEQUENCE_TASK, seq);
  1341. GTA.Native.Function.Call(Hash.TASK_PERFORM_SEQUENCE, Game.Player.Character, seq);
  1342. GTA.Native.Function.Call(Hash.CLEAR_SEQUENCE_TASK, &seq);
  1343. Robs[0].Teller.AlwaysKeepTask = true;
  1344. }
  1345. Wait(2500);
  1346. Robs[0].BoxDoor.Heading -= 90.0f;
  1347. Wait(500);
  1348. Robs[0].CashEnvelope.Delete();
  1349. Wait(2500);
  1350. Robs[0].BoxDoor.Heading += 90.0f;
  1351. Wait(1000);
  1352. Drill.RemoveDriller();
  1353. Game.Player.Character.FreezePosition = false;
  1354.  
  1355. //Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 0);
  1356. //if (Game.Player.WantedLevel <= WantedLevel)
  1357. //{
  1358. // Game.Player.WantedLevel = WantedLevel;
  1359.  
  1360. //}
  1361. Robs[0].Objective_Index = 13;
  1362. }
  1363.  
  1364. }
  1365. break;
  1366. case 13:
  1367. {
  1368. UI.ShowSubtitle("~y~Leave ~w~the ~g~bank.", 000);
  1369. if (Game.Player.Character.Position.DistanceTo(EnterExitBank_Locations[Robs[0].List_Index]) < 2.0f)
  1370. {
  1371. Function.Call(Hash.PLAY_SOUND_FRONTEND, Robs[0].Checkpoint_Sound, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", 1);
  1372.  
  1373. Vehicle lastVehicle = Function.Call<Vehicle>((Hash)0xB2D06FAEDE65B577);// GET_LAST_DRIVEN_VEHICLE
  1374. if (lastVehicle != null)
  1375. {
  1376. Function.Call(Hash.SET_VEHICLE_IS_WANTED, lastVehicle, true);
  1377. }
  1378.  
  1379. Robs[0].Objective_Index = 14;
  1380. }
  1381. }
  1382. break;
  1383.  
  1384. case 14:
  1385. {
  1386. UI.ShowSubtitle("Lose The Cops.", 1000);
  1387. if (Game.Player.WantedLevel < 1)
  1388. {
  1389. Robs[0].Objective_Index = 15;
  1390. Passed_Index = 0;
  1391. BankAvalible[Robs[0].List_Index] = false;
  1392. }
  1393. }
  1394. break;
  1395. case 15:
  1396. {
  1397. Robs[0].Objective_Index = -1;
  1398. }
  1399. break;
  1400.  
  1401. }
  1402.  
  1403. if (Robs[0].Objective_Index > -1 && Robs[0].Objective_Index < 7 && Robs[0].Teller.IsAlive == false && Robs[0].Faild == false)
  1404. {
  1405. BankAvalible[Robs[0].List_Index] = false;
  1406.  
  1407. Function.Call(Hash.PLAY_SOUND_FRONTEND, -1, "ScreenFlash", "MissionFailedSounds", 1);
  1408. Function.Call(Hash.PLAY_MISSION_COMPLETE_AUDIO, "GENERIC_FAILED");
  1409. WhoDied = "The ~b~Teller ";
  1410. Robs[0].Faild = true;
  1411. run = true;
  1412. step = 0;
  1413. Robs[0].RemoveRob();
  1414. Robs.RemoveAt(0);
  1415. }
  1416.  
  1417. if (Game.Player.IsDead)
  1418. {
  1419. while (!Game.IsScreenFadedOut)
  1420. {
  1421. Wait(10);
  1422. }
  1423. while (Game.IsScreenFadedOut)
  1424. {
  1425. Wait(4000);
  1426. }
  1427.  
  1428. BankAvalible[Robs[0].List_Index] = false;
  1429.  
  1430. Function.Call(Hash.PLAY_MISSION_COMPLETE_AUDIO, "GENERIC_FAILED");
  1431.  
  1432. WhoDied = "You ";
  1433. Robs[0].Faild = true;
  1434. run = true;
  1435. step = 0;
  1436. Robs[0].RemoveRob();
  1437. Robs.RemoveAt(0);
  1438. }
  1439.  
  1440. }
  1441.  
  1442. if (Function.Call<int>(Hash.GET_CLOCK_HOURS) > 18 || Function.Call<int>(Hash.GET_CLOCK_HOURS) < 7)
  1443. {
  1444. for (int i = 0; i < BankAvalible.Count; i++)
  1445. {
  1446. if (BankAvalible[i] == false)
  1447. {
  1448. BankAvalible[i] = true;
  1449. }
  1450. }
  1451. }
  1452.  
  1453. if (Robs.Count < 1 && Function.Call<int>(Hash.GET_CLOCK_HOURS) >= 7 && Function.Call<int>(Hash.GET_CLOCK_HOURS) < 18)
  1454. {
  1455. for (int i = 0; i < Bank_Locations.Count; i++)
  1456. {
  1457. if (BankAvalible[i] == true && Game.Player.WantedLevel == 0)
  1458. {
  1459. World.DrawMarker(MarkerType.VerticalCylinder, Bank_Locations[i], new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(2.0f, 2.0f, 0.5f), Color.FromArgb(51, 255, 107), false, true, 2, false, "", "", false);
  1460. }
  1461. else
  1462. {
  1463. World.DrawMarker(MarkerType.VerticalCylinder, Bank_Locations[i], new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(2.0f, 2.0f, 0.5f), Color.FromArgb(255, 0, 0), false, true, 2, false, "", "", false);
  1464. }
  1465. }
  1466. }
  1467.  
  1468.  
  1469.  
  1470. switch (Passed_Index)
  1471. {
  1472. case 0:
  1473. {
  1474. Scale = Function.Call<int>((Hash)0x11FE353CF9733E6F, "MIDSIZED_MESSAGE");
  1475. time = (int)Game.GameTime + 1500;
  1476. Passed_Index = 1;
  1477. }
  1478. break;
  1479.  
  1480. case 1:
  1481. {
  1482. if ((int)Game.GameTime > time)
  1483. {
  1484. if (Function.Call<bool>(Hash.HAS_SCALEFORM_MOVIE_LOADED, Scale))
  1485. {
  1486. Function.Call(Hash._START_SCREEN_EFFECT, "SuccessNeutral", 8500, false);
  1487.  
  1488. Function.Call(Hash.PLAY_SOUND_FRONTEND, -1, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", 1);
  1489. Function.Call(Hash.PLAY_MISSION_COMPLETE_AUDIO, "MICHAEL_BIG_01");
  1490.  
  1491. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION, Scale, "SHOW_SHARD_MIDSIZED_MESSAGE");
  1492.  
  1493. if (Robs[0].List_Index == 0)
  1494. {
  1495. if (!BankRobbed1)
  1496. {
  1497. KeysData.SetValue<bool>("settings", "BankRobbed1", true);
  1498. KeysData.Save();
  1499. BankRobbed1 = true;
  1500. }
  1501. }
  1502. if (Robs[0].List_Index == 1)
  1503. {
  1504. if (!BankRobbed2)
  1505. {
  1506. KeysData.SetValue("settings", "BankRobbed2", "True");
  1507. KeysData.Save();
  1508. BankRobbed2 = true;
  1509. }
  1510. }
  1511. if (Robs[0].List_Index == 2)
  1512. {
  1513. if (!BankRobbed3)
  1514. {
  1515. KeysData.SetValue("settings", "BankRobbed3", "True");
  1516. KeysData.Save();
  1517. BankRobbed3 = true;
  1518. }
  1519. }
  1520. if (Robs[0].List_Index == 3)
  1521. {
  1522. if (!BankRobbed4)
  1523. {
  1524. KeysData.SetValue("settings", "BankRobbed4", "True");
  1525. KeysData.Save();
  1526. BankRobbed4 = true;
  1527. }
  1528. }
  1529. if (Robs[0].List_Index == 4)
  1530. {
  1531. if (!BankRobbed5)
  1532. {
  1533. KeysData.SetValue("settings", "BankRobbed5", "True");
  1534. KeysData.Save();
  1535. BankRobbed5 = true;
  1536. }
  1537. }
  1538. if (Robs[0].List_Index == 5)
  1539. {
  1540. if (!BankRobbed6)
  1541. {
  1542. KeysData.SetValue("settings", "BankRobbed6", "True");
  1543. KeysData.Save();
  1544. BankRobbed6 = true;
  1545. }
  1546. }
  1547.  
  1548. int banksRobbed = 0;
  1549.  
  1550. if (BankRobbed1)
  1551. {
  1552. banksRobbed += 1;
  1553. }
  1554. if (BankRobbed2)
  1555. {
  1556. banksRobbed += 1;
  1557. }
  1558. if (BankRobbed3)
  1559. {
  1560. banksRobbed += 1;
  1561. }
  1562. if (BankRobbed4)
  1563. {
  1564. banksRobbed += 1;
  1565. }
  1566. if (BankRobbed5)
  1567. {
  1568. banksRobbed += 1;
  1569. }
  1570. if (BankRobbed6)
  1571. {
  1572. banksRobbed += 1;
  1573. }
  1574.  
  1575. Function.Call(Hash._BEGIN_TEXT_COMPONENT, "STRING");
  1576. Function.Call((Hash)0x6C188BE134E074AA, "~g~ROBBERY SUCCESS");
  1577. Function.Call(Hash._END_TEXT_COMPONENT);
  1578.  
  1579.  
  1580. int cash = Function.Call<int>(Hash.GET_RANDOM_INT_IN_RANGE, MinCash, MaxCash); //
  1581. Game.Player.Money += cash;
  1582. Function.Call(Hash._BEGIN_TEXT_COMPONENT, "STRING");
  1583. Function.Call((Hash)0x6C188BE134E074AA, "Banks Robbed " + banksRobbed.ToString() + "/6~n~" + "Money earned " + cash.ToString());
  1584. Function.Call(Hash._END_TEXT_COMPONENT);
  1585.  
  1586. Function.Call(Hash._POP_SCALEFORM_MOVIE_FUNCTION_VOID);
  1587.  
  1588. time = (int)Game.GameTime + 10000; // time to display message
  1589.  
  1590. Passed_Index = 2;
  1591. }
  1592. }
  1593.  
  1594. }
  1595. break;
  1596.  
  1597. case 2:
  1598. {
  1599. if (Function.Call<bool>(Hash.HAS_SCALEFORM_MOVIE_LOADED, Scale))
  1600. {
  1601. if ((int)Game.GameTime <= time)
  1602. {
  1603. Function.Call(Hash.DRAW_SCALEFORM_MOVIE_FULLSCREEN, Scale, 255, 255, 255, 255);
  1604. }
  1605. else if ((int)Game.GameTime < time + 100)
  1606. {
  1607. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION, Scale, "SHARD_ANIM_OUT");
  1608. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT, 1);// color 0,1=white 2=black 3=grey 6,7,8=red 9,10,11=blue 12,13,14=yellow 15,16,17=orange 18,19,20=green 21,22,23=purple
  1609. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT, .33f);
  1610.  
  1611. Function.Call(Hash._POP_SCALEFORM_MOVIE_FUNCTION_VOID);
  1612. time -= 100;
  1613. }
  1614. else if ((int)Game.GameTime < time + 2000)
  1615. {
  1616. Function.Call(Hash.DRAW_SCALEFORM_MOVIE_FULLSCREEN, Scale, 255, 255, 255, 255);
  1617. }
  1618. else
  1619. {
  1620. Passed_Index = 3;
  1621. }
  1622. }
  1623. }
  1624. break;
  1625. case 3:
  1626. {
  1627. unsafe
  1628. {
  1629. int b = Scale;
  1630.  
  1631. Function.Call(Hash.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED, &b);
  1632.  
  1633. Passed_Index = -1;
  1634. if (Robs.Count > 0)
  1635. {
  1636. Robs[0].RemoveRob();
  1637. Robs.RemoveAt(0);
  1638. }
  1639. }
  1640. }
  1641. break;
  1642. }
  1643.  
  1644.  
  1645. if (run)
  1646. {
  1647. switch (step)
  1648. {
  1649. case 0:
  1650. {
  1651. Scale = Function.Call<int>((Hash)0x11FE353CF9733E6F, "MIDSIZED_MESSAGE");
  1652.  
  1653. time = (int)Game.GameTime + 1500; // time before message is displayed
  1654. step = 1;
  1655.  
  1656. }
  1657. break;
  1658.  
  1659. case 1:
  1660. {
  1661. if ((int)Game.GameTime > time)
  1662. {
  1663. if (Function.Call<bool>(Hash.HAS_SCALEFORM_MOVIE_LOADED, Scale))
  1664. {
  1665. Function.Call(Hash._START_SCREEN_EFFECT, "SuccessNeutral", 8000, false);
  1666.  
  1667. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION, Scale, "SHOW_SHARD_MIDSIZED_MESSAGE");
  1668.  
  1669. Function.Call(Hash._BEGIN_TEXT_COMPONENT, "STRING");
  1670. Function.Call((Hash)0x6C188BE134E074AA, "Robbery Failed");
  1671. Function.Call(Hash._END_TEXT_COMPONENT);
  1672. Function.Call(Hash._BEGIN_TEXT_COMPONENT, "STRING");
  1673. Function.Call((Hash)0x6C188BE134E074AA, WhoDied + "~w~Died");
  1674. Function.Call(Hash._END_TEXT_COMPONENT);
  1675. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT, 6);// color 0,1=white 2=black 3=grey 6,7,8=red 9,10,11=blue 12,13,14=yellow 15,16,17=orange 18,19,20=green 21,22,23=purple
  1676.  
  1677. Function.Call(Hash._POP_SCALEFORM_MOVIE_FUNCTION_VOID);
  1678.  
  1679. time = (int)Game.GameTime + 8000; // time to display message
  1680. step = 2;
  1681. }
  1682. }
  1683.  
  1684. }
  1685. break;
  1686.  
  1687. case 2:
  1688. {
  1689. if (Function.Call<bool>(Hash.HAS_SCALEFORM_MOVIE_LOADED, Scale))
  1690. {
  1691. if ((int)Game.GameTime <= time)
  1692. {
  1693. Function.Call(Hash.DRAW_SCALEFORM_MOVIE_FULLSCREEN, Scale, 255, 255, 255, 255);
  1694. }
  1695. else if ((int)Game.GameTime < time + 100)
  1696. {
  1697. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION, Scale, "SHARD_ANIM_OUT");
  1698. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT, 1);// color 0,1=white 2=black 3=grey 6,7,8=red 9,10,11=blue 12,13,14=yellow 15,16,17=orange 18,19,20=green 21,22,23=purple
  1699. Function.Call(Hash._PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT, .33f);
  1700.  
  1701. Function.Call(Hash._POP_SCALEFORM_MOVIE_FUNCTION_VOID);
  1702. time -= 100;
  1703. }
  1704. else if ((int)Game.GameTime < time + 2000)
  1705. {
  1706. Function.Call(Hash.DRAW_SCALEFORM_MOVIE_FULLSCREEN, Scale, 255, 255, 255, 255);
  1707. }
  1708. else
  1709. {
  1710. step = 3;
  1711. }
  1712. }
  1713. }
  1714. break;
  1715. case 3:
  1716. {
  1717. unsafe
  1718. {
  1719. int b = Scale;
  1720.  
  1721. Function.Call(Hash.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED, &b);
  1722.  
  1723. step = -1;
  1724. }
  1725.  
  1726. if (Robs.Count > 0)
  1727. {
  1728. Robs[0].RemoveRob();
  1729. Robs.RemoveAt(0);
  1730. }
  1731.  
  1732. }
  1733. break;
  1734. }
  1735. }
  1736.  
  1737.  
  1738. if (Drill != null)
  1739. {
  1740.  
  1741. if (Game.Player.IsDead)
  1742. {
  1743. if (Drill.Drilling)
  1744. {
  1745. Drill.RemoveDriller();
  1746. }
  1747. }
  1748.  
  1749. if (Drill.Drilling)
  1750. {
  1751. UI.ShowSubtitle("Drill the ~g~safety deposit box", 1000);
  1752.  
  1753. Function.Call(Hash.DISABLE_CONTROL_ACTION, 2, 37); // left button weapon wheel
  1754. Function.Call(Hash.DISABLE_CONTROL_ACTION, 2, 27); // dpad up phone
  1755.  
  1756. Function.Call(Hash.DRAW_SCALEFORM_MOVIE_FULLSCREEN, Drill.ScaleFormDrilling, 255, 255, 255, 255);
  1757.  
  1758. float leftStick = 0; // used to set drill position
  1759. float rightTrigger = 0; // used to set drill speed
  1760.  
  1761. if (Game.CurrentInputMode == InputMode.GamePad)
  1762. {
  1763. leftStick = Function.Call<float>(Hash.GET_CONTROL_NORMAL, 2, 32); // get drill position with controler left stick
  1764.  
  1765. rightTrigger = Function.Call<float>(Hash.GET_CONTROL_NORMAL, 2, 24); // get input for drill speed
  1766. Drill.DrillSpeed = rightTrigger; // set drill speed
  1767. }
  1768. if (Game.CurrentInputMode == InputMode.MouseAndKeyboard) // if using Mouse And Keyboard
  1769. {
  1770. float mouse = Function.Call<float>(Hash.GET_CONTROL_NORMAL, 2, 240); // mouse up and down (cam)
  1771.  
  1772. mouse = 0.0f - mouse + .9f;
  1773.  
  1774. leftStick = mouse;
  1775.  
  1776. if (Function.Call<bool>(Hash.IS_CONTROL_JUST_PRESSED, 2, 241)) // wheel up // get input for drill speed
  1777. {
  1778. if (Drill.DrillSpeed < 1.0f)
  1779. {
  1780. Drill.DrillSpeed += .125f;
  1781. }
  1782. else
  1783. {
  1784. Drill.DrillSpeed = 1.0f;
  1785. }
  1786. }
  1787. if (Function.Call<bool>(Hash.IS_CONTROL_JUST_PRESSED, 2, 242)) // wheel down // get input for drill speed
  1788. {
  1789. if (Drill.DrillSpeed > .0f)
  1790. {
  1791. Drill.DrillSpeed -= .125f;
  1792. }
  1793. else
  1794. {
  1795. Drill.DrillSpeed = .0f;
  1796. }
  1797. }
  1798. }
  1799.  
  1800.  
  1801. if (Drill.ResetTime < (int)Game.GameTime)
  1802. {
  1803. if (Drill.DrillSpeed > 0)
  1804. {
  1805. if (Function.Call<bool>(Hash.HAS_SOUND_FINISHED, Drill.Sound))
  1806. {
  1807. Function.Call(Hash.PLAY_SOUND_FROM_ENTITY, Drill.Sound, "Drill", Drill.Drill_Prop, "DLC_HEIST_FLEECA_SOUNDSET", 1, 0);
  1808. }
  1809. }
  1810. else
  1811. {
  1812. Function.Call(Hash.STOP_SOUND, Drill.Sound);
  1813. }
  1814.  
  1815. if (Drill.DrillPosition == 0 && !Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_straight_idle", 3))
  1816. {
  1817. Function.Call(Hash.TASK_PLAY_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_straight_idle", 6.0f, .01f, -1, 0, .0f, 1, 1, 1);
  1818. }
  1819.  
  1820. if (Drill.DrillPosition > 0 && !Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_right_end", 3))
  1821. {
  1822. Function.Call(Hash.TASK_PLAY_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_right_end", 3.0f, .01f, -1, 0, .0f, 1, 1, 1);
  1823. }
  1824.  
  1825.  
  1826. if (Drill.DrillTemperature < 1.0f)
  1827. {
  1828. if (Drill.DrillPosition > Drill.DrillDepth - .2f)
  1829. {
  1830. if (Drill.DrillSpeed > .2f & Drill.DrillSpeed < .8f)
  1831. {
  1832. Drill.DrillDepth += .0003f;
  1833. }
  1834.  
  1835. if (Drill.DrillSpeed > .3f & Drill.DrillSpeed < .7f)
  1836. {
  1837. Drill.DrillDepth += .0003f;
  1838. }
  1839. if (Drill.DrillDepth > .776f)
  1840. {
  1841. if (Drill.DrillSpeed > .2f & Drill.DrillSpeed < .7f)
  1842. {
  1843. Drill.DrillDepth += .005f;
  1844. }
  1845. }
  1846. }
  1847. }
  1848.  
  1849. if (leftStick > .75f && Drill.DrillSpeed > .0f || leftStick > 0 && Drill.DrillSpeed > .75f)
  1850. {
  1851. if (Drill.DrillPosition > Drill.DrillDepth - .2f)
  1852. {
  1853. if (Drill.DrillTemperature < 1.0f)
  1854. {
  1855. Drill.DrillTemperature += .015f;
  1856. }
  1857. }
  1858. }
  1859.  
  1860. if (Drill.DrillSpeed == 0 || Drill.DrillPosition == 0)
  1861. {
  1862. if (Drill.DrillTemperature > .0f)
  1863. {
  1864. Drill.DrillTemperature -= .005f;
  1865. }
  1866. }
  1867.  
  1868. if (Drill.DrillSpeed < .01f)
  1869. {
  1870. Function.Call(Hash.REMOVE_PARTICLE_FX, Drill.DrillFX, 0);
  1871. }
  1872.  
  1873. if (leftStick > 0)
  1874. {
  1875. if (Drill.DrillPosition < Drill.DrillDepth - .2f)
  1876. {
  1877. Drill.DrillPosition += .05f;
  1878. }
  1879. if (Drill.DrillPosition < Drill.DrillDepth)
  1880. {
  1881. Drill.DrillPosition += .01f;
  1882.  
  1883. if (Drill.DrillSpeed > 0)
  1884. {
  1885. Function.Call(Hash.REMOVE_PARTICLE_FX, Drill.DrillFX, 0);
  1886. Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "fm_mission_controler");
  1887. Drill.DrillFX = Function.Call<int>(Hash._START_PARTICLE_FX_LOOPED_ON_ENTITY_2, "scr_drill_debris", Drill.Drill_Prop, 0.0f, -0.55f, .01f, 90.0f, 90.0f, 90.0f, .8f, 0, 0, 0);
  1888. Function.Call(Hash.SET_PARTICLE_FX_LOOPED_EVOLUTION, Drill.DrillFX, "power", .7f, 0);
  1889. }
  1890. else
  1891. {
  1892. Function.Call(Hash.REMOVE_PARTICLE_FX, Drill.DrillFX, 0);
  1893. }
  1894. }
  1895. }
  1896. else
  1897. {
  1898. Drill.DrillPosition = .0f;
  1899. Function.Call(Hash.REMOVE_PARTICLE_FX, Drill.DrillFX, 0);
  1900. }
  1901.  
  1902. Function.Call(Hash.SET_VARIABLE_ON_SOUND, Drill.Sound, "DrillState", .0);
  1903.  
  1904. if (leftStick > Drill.DrillDepth && leftStick < Drill.DrillDepth + .2f)
  1905. {
  1906. Function.Call(Hash.SET_VARIABLE_ON_SOUND, Drill.Sound, "DrillState", .5);
  1907. }
  1908. if (leftStick > Drill.DrillDepth && leftStick > Drill.DrillDepth + .2f)
  1909. {
  1910. Function.Call(Hash.SET_VARIABLE_ON_SOUND, Drill.Sound, "DrillState", 1.0);
  1911. }
  1912.  
  1913.  
  1914. if (Drill.DrillDepth > .326f && !Drill.Pin_one)
  1915. {
  1916. Function.Call(Hash.PLAY_SOUND_FRONTEND, Drill.PinSound, "Drill_Pin_Break", "DLC_HEIST_FLEECA_SOUNDSET", 1);
  1917. Drill.Pin_one = true;
  1918. }
  1919. if (Drill.DrillDepth > .476f && !Drill.Pin_two)
  1920. {
  1921. Function.Call(Hash.PLAY_SOUND_FRONTEND, Drill.PinSound, "Drill_Pin_Break", "DLC_HEIST_FLEECA_SOUNDSET", 1);
  1922. Drill.Pin_two = true;
  1923. }
  1924. if (Drill.DrillDepth > .625f && !Drill.Pin_three)
  1925. {
  1926. Function.Call(Hash.PLAY_SOUND_FRONTEND, Drill.PinSound, "Drill_Pin_Break", "DLC_HEIST_FLEECA_SOUNDSET", 1);
  1927. Drill.Pin_three = true;
  1928. }
  1929. if (Drill.DrillDepth > .776f && !Drill.Pin_four)
  1930. {
  1931. Function.Call(Hash.PLAY_SOUND_FRONTEND, Drill.PinSound, "Drill_Pin_Break", "DLC_HEIST_FLEECA_SOUNDSET", 1);
  1932. Drill.Pin_four = true;
  1933. }
  1934.  
  1935. if (Drill.DrillTemperature > .99f || Drill.DrillPosition > Drill.DrillDepth + .3f)
  1936. {
  1937. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, Drill.Sound))
  1938. {
  1939. Function.Call(Hash.SET_VARIABLE_ON_SOUND, Drill.Sound, "DrillState", .0);
  1940.  
  1941. Function.Call(Hash.STOP_SOUND, Drill.Sound);
  1942. }
  1943. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, Drill.PinSound))
  1944. {
  1945. Function.Call(Hash.STOP_SOUND, Drill.PinSound);
  1946. }
  1947.  
  1948. Function.Call(Hash.PLAY_SOUND_FROM_ENTITY, Drill.FailSound, "Drill_Jam", Game.Player.Character, "DLC_HEIST_FLEECA_SOUNDSET", 1, 20);
  1949.  
  1950. Drill.Fail();
  1951. }
  1952.  
  1953. }
  1954.  
  1955. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, Drill.ScaleFormDrilling, "SET_TEMPERATURE", Drill.DrillTemperature, -1082130432, -1082130432, -1082130432, -1082130432);
  1956.  
  1957. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, Drill.ScaleFormDrilling, "SET_DRILL_POSITION", Drill.DrillPosition, -1082130432, -1082130432, -1082130432, -1082130432);
  1958.  
  1959. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, Drill.ScaleFormDrilling, "SET_SPEED", Drill.DrillSpeed, -1082130432, -1082130432, -1082130432, -1082130432);
  1960.  
  1961. if (Robs.Count > 0)
  1962. {
  1963. if (Drill.DrillPosition > .8f)
  1964. {
  1965. Function.Call(Hash.REMOVE_PARTICLE_FX, Drill.DrillFX, 0);
  1966.  
  1967. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, Drill.Sound))
  1968. {
  1969. Function.Call(Hash.STOP_SOUND, Drill.Sound);
  1970. }
  1971.  
  1972. Drill.DrillTemperature = 0;
  1973. Drill.DrillSpeed = 0;
  1974. Robs[0].Drilling_Done = true;
  1975.  
  1976. }
  1977. }
  1978. }
  1979. }
  1980. }
  1981.  
  1982. public void OnKeyUp(object o, KeyEventArgs e)
  1983. {
  1984.  
  1985. KeysData = ScriptSettings.Load("scripts//RobFleeca.ini");
  1986.  
  1987. Keys StartKey = KeysData.GetValue<Keys>("settings", "StartKey", Keys.U);
  1988.  
  1989.  
  1990. if (e.KeyCode == StartKey)
  1991. {
  1992. if (Game.Player.WantedLevel < 1 && Robs.Count < 1 && Function.Call<int>(Hash.GET_CLOCK_HOURS) >= 7 && Function.Call<int>(Hash.GET_CLOCK_HOURS) < 18) // 7am - 6pm
  1993. {
  1994. for (int i = 0; i < Bank_Locations.Count; i++)
  1995. {
  1996. if (Bank_Locations[i].DistanceTo(Game.Player.Character.Position) < 12.0f && BankAvalible[i] == true)
  1997. {
  1998. Rob rob = new Rob(i);
  1999. Robs.Add(rob);
  2000. }
  2001. }
  2002. }
  2003. }
  2004.  
  2005.  
  2006. }
  2007.  
  2008. public class Rob
  2009. {
  2010. public Rob(int list_index)
  2011. {
  2012.  
  2013. this.Objective_Index = 0;
  2014.  
  2015. this.List_Index = list_index;
  2016.  
  2017. this.Teller_Door_Open = false;
  2018.  
  2019. this.Vault_Door_Open = false;
  2020.  
  2021. this.Faild = false;
  2022.  
  2023. this.Drilling_Done = false;
  2024.  
  2025. this.TellerCower = false;
  2026.  
  2027. this.Hostage3Cower = false;
  2028.  
  2029. Function.Call(Hash.REQUEST_ANIM_DICT, "amb@prop_human_atm@female@idle_a");
  2030. Function.Call(Hash.REQUEST_ANIM_DICT, "anim@heists@fleeca_bank@bank_vault_door");
  2031. Function.Call(Hash.REQUEST_ANIM_DICT, "anim@heists@fleeca_bank@drilling");
  2032.  
  2033. while (!Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, "amb@prop_human_atm@female@idle_a") &&
  2034. !Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, "anim@heists@fleeca_bank@bank_vault_door") &&
  2035. !Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, "anim@heists@fleeca_bank@drilling") &&
  2036. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HEIST_FLEECA_DRILL", 0, -1) &&
  2037. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HEIST_FLEECA_DRILL_2", 0, -1) &&
  2038. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL", 0, -1) &&
  2039. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL_2", 0, -1) &&
  2040. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "SAFE_CRACK", 0, -1) &&
  2041. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_Biker_Cracked_Sounds", 0, -1) &&
  2042. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HUD_MINI_GAME_SOUNDSET", 0, -1) &&
  2043. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "MissionFailedSounds", 0, -1) &&
  2044. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "dlc_heist_fleeca_bank_door_sounds", 0, -1) &&
  2045. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "vault_door", 0, -1) &&
  2046. !Function.Call<bool>(Hash.REQUEST_SCRIPT_AUDIO_BANK, "Alarms", 0, -1) &&
  2047. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_HEIST_FLEECA_SOUNDSET", 0, -1))
  2048. {
  2049. Wait(100);
  2050. }
  2051.  
  2052. this.Alarm_Sound = -1;
  2053.  
  2054. this.Vault_Sound = -1;
  2055.  
  2056. this.Checkpoint_Sound = -1;
  2057.  
  2058. this.Alarm_Sound = Function.Call<int>(Hash.GET_SOUND_ID);
  2059.  
  2060. while (this.Alarm_Sound == -1)
  2061. {
  2062. Wait(0);
  2063. }
  2064.  
  2065. this.Vault_Sound = Function.Call<int>(Hash.GET_SOUND_ID);
  2066.  
  2067. while (this.Vault_Sound == -1)
  2068. {
  2069. Wait(0);
  2070. }
  2071.  
  2072. this.Checkpoint_Sound = Function.Call<int>(Hash.GET_SOUND_ID);
  2073.  
  2074. while (this.Checkpoint_Sound == -1)
  2075. {
  2076. Wait(0);
  2077. }
  2078. }
  2079.  
  2080. public int Objective_Index;
  2081.  
  2082. public int List_Index;
  2083.  
  2084. public Ped Teller;
  2085.  
  2086. public bool TellerCower;
  2087.  
  2088. public Ped Hostage1;
  2089.  
  2090. public Ped Hostage2;
  2091.  
  2092. public Ped Hostage3;
  2093.  
  2094. public bool Hostage3Cower;
  2095.  
  2096. public Prop Cam1;
  2097.  
  2098. public Prop Cam2;
  2099.  
  2100. public Prop Cam3;
  2101.  
  2102. public Prop Cam4;
  2103.  
  2104. public Prop Cam5;
  2105.  
  2106. public Prop BoxWall;
  2107.  
  2108. public Prop BoxDoor;
  2109.  
  2110. public Prop CashEnvelope;
  2111.  
  2112. public bool Faild;
  2113.  
  2114. public bool Drilling_Done;
  2115.  
  2116. public Blip Drill_LocationBlip;
  2117.  
  2118. public bool Teller_Door_Open;
  2119.  
  2120. public bool Vault_Door_Open;
  2121.  
  2122. public int Alarm_Sound;
  2123.  
  2124. public int Vault_Sound;
  2125.  
  2126. public int Checkpoint_Sound;
  2127.  
  2128. public void RemoveRob() // funtion to remove when canciling or complete
  2129. {
  2130. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.Alarm_Sound))
  2131. {
  2132. Function.Call(Hash.STOP_SOUND, this.Alarm_Sound);
  2133. }
  2134.  
  2135. //if (this.Alarm_Sound != 0) // release all sounds
  2136. //{
  2137. Function.Call(Hash.RELEASE_SOUND_ID, this.Alarm_Sound);
  2138. //}
  2139.  
  2140. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.Vault_Sound))
  2141. {
  2142. Function.Call(Hash.STOP_SOUND, this.Vault_Sound);
  2143. }
  2144.  
  2145. //if (this.Vault_Sound != 0) // release all sounds
  2146. //{
  2147. Function.Call(Hash.RELEASE_SOUND_ID, this.Vault_Sound);
  2148. //}
  2149.  
  2150. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.Checkpoint_Sound))
  2151. {
  2152. Function.Call(Hash.STOP_SOUND, this.Checkpoint_Sound);
  2153. }
  2154.  
  2155. //if (this.Checkpoint_Sound != 0) // release all sounds
  2156. //{
  2157. Function.Call(Hash.RELEASE_SOUND_ID, this.Checkpoint_Sound);
  2158. //}
  2159.  
  2160. //Function.Call(Hash.REMOVE_ANIM_DICT, "mp_heists@keypad@");
  2161.  
  2162. Function.Call(Hash.REMOVE_ANIM_DICT, "anim@heists@fleeca_bank@bank_vault_door");
  2163. Function.Call(Hash.REMOVE_ANIM_DICT, "amb@prop_human_atm@female@idle_a");
  2164. Function.Call(Hash.REMOVE_ANIM_DICT, "anim@heists@fleeca_bank@drilling");
  2165.  
  2166. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "SAFE_CRACK");
  2167. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_Biker_Cracked_Sounds");
  2168. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HUD_MINI_GAME_SOUNDSET");
  2169. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "MissionFailedSounds");
  2170. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "vault_door");
  2171. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "Alarms");
  2172.  
  2173. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "SAFE_CRACK");
  2174. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_Biker_Cracked_Sounds");
  2175. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HUD_MINI_GAME_SOUNDSET");
  2176. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "MissionFailedSounds");
  2177. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "dlc_heist_fleeca_bank_door_sounds");
  2178. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "vault_door");
  2179. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "Alarms");
  2180.  
  2181. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL");
  2182. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL_2");
  2183. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL");
  2184. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL_2");
  2185. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_HEIST_FLEECA_SOUNDSET");
  2186.  
  2187. Game.Player.WantedLevel = Function.Call<int>((Hash)0x4C9296CBCD1B971E);
  2188.  
  2189. Function.Call(Hash.SET_FAKE_WANTED_LEVEL, 0);
  2190.  
  2191. if (this.Teller.CurrentBlip != null)
  2192. {
  2193. this.Teller.CurrentBlip.Remove();
  2194. }
  2195. if (this.Teller != null)
  2196. {
  2197. this.Teller.MarkAsNoLongerNeeded();
  2198. }
  2199.  
  2200. if (this.Hostage1.CurrentBlip != null)
  2201. {
  2202. this.Hostage1.CurrentBlip.Remove();
  2203. }
  2204. if (this.Hostage1 != null)
  2205. {
  2206. this.Hostage1.MarkAsNoLongerNeeded();
  2207. }
  2208.  
  2209. if (this.Hostage2.CurrentBlip != null)
  2210. {
  2211. this.Hostage2.CurrentBlip.Remove();
  2212. }
  2213. if (this.Hostage2 != null)
  2214. {
  2215. this.Hostage2.MarkAsNoLongerNeeded();
  2216. }
  2217.  
  2218. if (this.Hostage3.CurrentBlip != null)
  2219. {
  2220. this.Hostage3.CurrentBlip.Remove();
  2221. }
  2222. if (this.Hostage3 != null)
  2223. {
  2224. this.Hostage3.MarkAsNoLongerNeeded();
  2225. }
  2226.  
  2227. if (this.Cam1 != null)
  2228. {
  2229. if (this.Cam1.CurrentBlip.Exists())
  2230. {
  2231. this.Cam1.CurrentBlip.Remove();
  2232. }
  2233. this.Cam1.MarkAsNoLongerNeeded();
  2234. }
  2235. if (this.Cam2 != null)
  2236. {
  2237. if (this.Cam2.CurrentBlip.Exists())
  2238. {
  2239. this.Cam2.CurrentBlip.Remove();
  2240. }
  2241. this.Cam2.MarkAsNoLongerNeeded();
  2242. }
  2243. if (this.Cam3 != null)
  2244. {
  2245. if (this.Cam3.CurrentBlip.Exists())
  2246. {
  2247. this.Cam3.CurrentBlip.Remove();
  2248. }
  2249. this.Cam3.MarkAsNoLongerNeeded();
  2250. }
  2251. if (this.Cam4 != null)
  2252. {
  2253. if (this.Cam4.CurrentBlip.Exists())
  2254. {
  2255. this.Cam4.CurrentBlip.Remove();
  2256. }
  2257. this.Cam4.MarkAsNoLongerNeeded();
  2258. }
  2259. if (this.Cam5 != null)
  2260. {
  2261. if (this.Cam5.CurrentBlip.Exists())
  2262. {
  2263. this.Cam5.CurrentBlip.Remove();
  2264. }
  2265. this.Cam5.MarkAsNoLongerNeeded();
  2266. }
  2267. if (this.Drill_LocationBlip != null)
  2268. {
  2269. this.Drill_LocationBlip.Remove();
  2270. }
  2271.  
  2272. if (this.BoxWall != null)
  2273. {
  2274. this.BoxWall.MarkAsNoLongerNeeded();
  2275. }
  2276. if (this.BoxDoor != null)
  2277. {
  2278. this.BoxDoor.MarkAsNoLongerNeeded();
  2279. }
  2280. if (this.CashEnvelope != null)
  2281. {
  2282. this.CashEnvelope.MarkAsNoLongerNeeded();
  2283. }
  2284.  
  2285. this.Faild = false;
  2286. }
  2287. }
  2288.  
  2289.  
  2290. public class Driller
  2291. {
  2292.  
  2293. public Driller()
  2294. {
  2295. Game.Player.Character.Weapons.Give(WeaponHash.Unarmed, 0, true, true);
  2296.  
  2297. Function.Call(Hash.SET_PED_CAN_SWITCH_WEAPON, false);
  2298.  
  2299. Game.Player.Character.FreezePosition = true;
  2300.  
  2301. int scale = Function.Call<int>(Hash.REQUEST_SCALEFORM_MOVIE_INSTANCE, "DRILLING");
  2302.  
  2303. while (!Function.Call<bool>(Hash.HAS_SCALEFORM_MOVIE_LOADED, scale))
  2304. {
  2305. Wait(100);
  2306. }
  2307.  
  2308. this.ScaleFormDrilling = scale;
  2309.  
  2310. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, scale, "SET_SPEED", .0f, -1082130432, -1082130432, -1082130432, -1082130432);
  2311. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, scale, "SET_HOLE_DEPTH", .1f, -1082130432, -1082130432, -1082130432, -1082130432);
  2312. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, scale, "SET_DRILL_POSITION", .0f, -1082130432, -1082130432, -1082130432, -1082130432);
  2313. Function.Call(Hash._CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS, scale, "SET_TEMPERATURE", .0f, -1082130432, -1082130432, -1082130432, -1082130432);
  2314.  
  2315. Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "fm_mission_controler");
  2316.  
  2317. Function.Call(Hash.REQUEST_ANIM_DICT, "anim@heists@fleeca_bank@drilling");
  2318.  
  2319. while (!Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, "anim@heists@fleeca_bank@drilling") &&
  2320. !Function.Call<bool>(Hash.HAS_NAMED_PTFX_ASSET_LOADED, "fm_mission_controler") &&
  2321. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HEIST_FLEECA_DRILL", 0, -1) &&
  2322. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HEIST_FLEECA_DRILL_2", 0, -1) &&
  2323. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL", 0, -1) &&
  2324. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL_2", 0, -1) &&
  2325. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "SAFE_CRACK", 0, -1) &&
  2326. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_Biker_Cracked_Sounds", 0, -1) &&
  2327. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "HUD_MINI_GAME_SOUNDSET", 0, -1) &&
  2328. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "MissionFailedSounds", 0, -1) &&
  2329. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "dlc_heist_fleeca_bank_door_sounds", 0, -1) &&
  2330. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "vault_door", 0, -1) &&
  2331. !Function.Call<bool>(Hash.REQUEST_SCRIPT_AUDIO_BANK, "Alarms", 0, -1) &&
  2332. !Function.Call<bool>(Hash.REQUEST_AMBIENT_AUDIO_BANK, "DLC_HEIST_FLEECA_SOUNDSET", 0, -1))
  2333. {
  2334. Wait(100);
  2335. }
  2336.  
  2337. this.Sound = Function.Call<int>(Hash.GET_SOUND_ID);
  2338.  
  2339. this.PinSound = Function.Call<int>(Hash.GET_SOUND_ID);
  2340.  
  2341. this.FailSound = Function.Call<int>(Hash.GET_SOUND_ID);
  2342.  
  2343. var model = new Model("hei_prop_heist_drill");
  2344. model.Request(10000);
  2345. Prop drill = World.CreateProp(model, Game.Player.Character.Position, false, false);
  2346. this.Drill_Prop = drill;
  2347. drill.FreezePosition = true;
  2348. drill.HasCollision = false;
  2349. Function.Call(Hash.ATTACH_ENTITY_TO_ENTITY, drill, Game.Player.Character, Game.Player.Character.GetBoneIndex((Bone)28422), 0f, 0f, 0f, 0f, 0f, 0f, 0, 0, 0, 0, 2, 1);
  2350. drill.IsInvincible = true;
  2351. model.MarkAsNoLongerNeeded();
  2352.  
  2353. Vector3 po = Game.Player.Character.Position + Game.Player.Character.ForwardVector * 1;
  2354.  
  2355. Function.Call(Hash.TASK_PLAY_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_right_end", 1.0f, .1f, 2000, 0, .0f, 1, 1, 1);
  2356.  
  2357. this.Drilling = true;
  2358.  
  2359. this.DrillSpeed = 0.0f;
  2360.  
  2361. this.DrillPosition = 0.0f;
  2362.  
  2363. this.DrillDepth = 0.1f;
  2364.  
  2365. this.DrillTemperature = 0.0f;
  2366.  
  2367. this.Pin_one = false;
  2368.  
  2369. this.Pin_two = false;
  2370.  
  2371. this.Pin_three = false;
  2372.  
  2373. this.Pin_four = false;
  2374.  
  2375. this.Reset = false;
  2376.  
  2377. this.CamMode = 1;
  2378.  
  2379. }
  2380.  
  2381. public int ScaleFormDrilling;
  2382.  
  2383. public int DrillingSound;
  2384.  
  2385. public bool Drilling;
  2386.  
  2387. public Prop Drill_Prop;
  2388.  
  2389. public Prop CashPickup;
  2390.  
  2391. public bool Pin_one;
  2392.  
  2393. public bool Pin_two;
  2394.  
  2395. public bool Pin_three;
  2396.  
  2397. public bool Pin_four;
  2398.  
  2399. public bool Reset;
  2400.  
  2401. public float DrillSpeed;
  2402.  
  2403. public float DrillDepth;
  2404.  
  2405. public float DrillPosition;
  2406.  
  2407. public float DrillTemperature;
  2408.  
  2409. public int Sound;
  2410.  
  2411. public int PinSound;
  2412.  
  2413. public int FailSound;
  2414.  
  2415. public int DrillFX;
  2416.  
  2417. public int ResetTime;
  2418.  
  2419. public int CamMode;
  2420.  
  2421. public void Fail()
  2422. {
  2423. Function.Call(Hash.REMOVE_PARTICLE_FX, this.DrillFX, 0);
  2424. Function.Call(Hash.TASK_PLAY_ANIM, Game.Player.Character, "anim@heists@fleeca_bank@drilling", "drill_straight_fail", 1.0f, .1f, 2000, 0, .0f, 1, 1, 1);
  2425. this.DrillPosition = 0.0f;
  2426. this.DrillSpeed = 0.0f;
  2427. this.DrillTemperature = 0.0f;
  2428. this.Reset = false;
  2429. this.ResetTime = (int)Game.GameTime + 1000; // set reset time so you cant contimue for 1 second
  2430. }
  2431.  
  2432. public void RemoveDriller()
  2433. {
  2434. Function.Call(Hash.ENABLE_CONTROL_ACTION, 2, 37); //weapon wheel
  2435. Function.Call(Hash.ENABLE_CONTROL_ACTION, 2, 27); // dpad up phone
  2436.  
  2437. Function.Call(Hash.SET_PED_CAN_SWITCH_WEAPON, true);
  2438.  
  2439. Game.Player.Character.FreezePosition = false;
  2440.  
  2441. Game.Player.CanControlCharacter = true;
  2442.  
  2443. Game.Player.Character.Task.ClearAllImmediately();
  2444.  
  2445. if (this.Drill_Prop != null)
  2446. {
  2447. this.Drill_Prop.Delete();
  2448.  
  2449. }
  2450. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.Sound))
  2451. {
  2452. Function.Call(Hash.STOP_SOUND, this.Sound);
  2453. }
  2454. if (this.Sound != 0)
  2455. {
  2456. Function.Call(Hash.RELEASE_SOUND_ID, this.Sound);
  2457. }
  2458.  
  2459. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.PinSound))
  2460. {
  2461. Function.Call(Hash.STOP_SOUND, this.PinSound);
  2462. }
  2463. if (this.PinSound != 0)
  2464. {
  2465. Function.Call(Hash.RELEASE_SOUND_ID, this.PinSound);
  2466. }
  2467.  
  2468. if (!Function.Call<bool>(Hash.HAS_SOUND_FINISHED, this.FailSound))
  2469. {
  2470. Function.Call(Hash.STOP_SOUND, this.FailSound);
  2471. }
  2472. if (this.FailSound != 0)
  2473. {
  2474. Function.Call(Hash.RELEASE_SOUND_ID, this.FailSound);
  2475. }
  2476.  
  2477.  
  2478. Function.Call(Hash.REMOVE_PARTICLE_FX, this.DrillFX, 0);
  2479.  
  2480. this.Drilling = false;
  2481.  
  2482. this.Pin_one = false;
  2483.  
  2484. this.Pin_two = false;
  2485.  
  2486. this.Pin_three = false;
  2487.  
  2488. this.Pin_four = false;
  2489.  
  2490. unsafe
  2491. {
  2492. int d = this.ScaleFormDrilling;
  2493.  
  2494. Function.Call(Hash.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED, &d);
  2495. }
  2496.  
  2497. //for (int i = 0; i < Function.Call<int>(Hash.GET_SOUND_ID) + 1; i++)
  2498. //{
  2499. // Function.Call(Hash.STOP_SOUND, i);
  2500. // Function.Call(Hash.RELEASE_SOUND_ID, i);
  2501. //}
  2502.  
  2503. Function.Call(Hash._REMOVE_NAMED_PTFX_ASSET, "fm_mission_controler");
  2504.  
  2505. Function.Call(Hash.REMOVE_ANIM_DICT, "anim@heists@fleeca_bank@drilling");
  2506.  
  2507. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL");
  2508.  
  2509. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL_2");
  2510.  
  2511. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL");
  2512.  
  2513. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL_2");
  2514.  
  2515. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_HEIST_FLEECA_SOUNDSET");
  2516.  
  2517. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "SAFE_CRACK");
  2518. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_Biker_Cracked_Sounds");
  2519. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HUD_MINI_GAME_SOUNDSET");
  2520. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "MissionFailedSounds");
  2521. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "dlc_heist_fleeca_bank_door_sounds");
  2522. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "vault_door");
  2523. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "Alarms");
  2524.  
  2525. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL");
  2526. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "HEIST_FLEECA_DRILL_2");
  2527. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL");
  2528. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_MPHEIST\\HEIST_FLEECA_DRILL_2");
  2529. //Function.Call(Hash.RELEASE_NAMED_SCRIPT_AUDIO_BANK, "DLC_HEIST_FLEECA_SOUNDSET");
  2530. }
  2531.  
  2532.  
  2533.  
  2534. }
  2535.  
  2536. void DisplayHelpTextThisFrame(string text) // used to display quit message. credit jedijosh920 for this function
  2537. {
  2538. Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
  2539. Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
  2540. Function.Call(Hash._0x238FFE5C7B0498A6, 0, 0, 1, -1);
  2541. }
  2542.  
  2543.  
  2544. }
  2545. }
RAW Paste Data Copied