Advertisement
Guest User

Indenting is a bit weird

a guest
May 24th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. void process_main_menu()
  2. {
  3. const float lineWidth = 250.0;
  4. const int lineCount = 7;
  5.  
  6. std::string caption = "MORE HEISTS!";
  7.  
  8. static LPCSTR lineCaption[lineCount] = {
  9. "HEIST #1",
  10. "WEAPON",
  11. "VEHICLE",
  12. "WORLD",
  13. "TIME",
  14. "WEATHER",
  15. "MISC"
  16. };
  17.  
  18. DWORD waitTime = 150;
  19. while (true)
  20. {
  21. // timed menu draw, used for pause after active line switch
  22. DWORD maxTickCount = GetTickCount() + waitTime;
  23. do
  24. {
  25. // draw menu
  26. draw_menu_line(caption, lineWidth, 15.0, 18.0, 0.0, 5.0, false, true);
  27. for (int i = 0; i < lineCount; i++)
  28. if (i != activeLineIndexMain)
  29. draw_menu_line(lineCaption[i], lineWidth, 9.0, 60.0 + i * 36.0, 0.0, 9.0, false, false);
  30. draw_menu_line(lineCaption[activeLineIndexMain], lineWidth + 1.0, 11.0, 56.0 + activeLineIndexMain * 36.0, 0.0, 7.0, true, false);
  31.  
  32. update_features();
  33. WAIT(0);
  34. } while (GetTickCount() < maxTickCount);
  35. waitTime = 0;
  36.  
  37. // process buttons
  38. bool bSelect, bBack, bUp, bDown;
  39. get_button_state(&bSelect, &bBack, &bUp, &bDown, NULL, NULL);
  40. if (bSelect)
  41. {
  42. switch (activeLineIndexMain)
  43. {
  44. case 0:
  45. {
  46. int distance, distance2;
  47. Ped playerPed = PLAYER::PLAYER_PED_ID();
  48. Player player = PLAYER::PLAYER_ID();
  49. Vector3 position = ENTITY::GET_ENTITY_COORDS(playerPed, 1);
  50. distance = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(position.x, position.y, position.z, -2010.901f, 2838.797f, 32.810f, 1);
  51. distance2 = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(position.x, position.y, position.z, -1294.469f, -213.963f, 60.654f, 1);
  52. int Pickup = GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_CASE");
  53. int l_11A1 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 1);
  54. int Plane = GAMEPLAY::GET_HASH_KEY("cargoplane");
  55. STREAMING::REQUEST_MODEL(Plane);
  56. while (STREAMING::HAS_MODEL_LOADED(Plane))
  57. {
  58. WAIT(0);
  59. }
  60. Vehicle PlaneNoEntry = VEHICLE::CREATE_VEHICLE(Plane, -2018.499f, 2865.134f, 32.905f, 180, 1, 1);
  61. VEHICLE::SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(l_11A1, 1);
  62.  
  63. STREAMING::REQUEST_MODEL(Plane);
  64. while (STREAMING::HAS_MODEL_LOADED(Plane))
  65. {
  66. WAIT(0);
  67. }
  68. OBJECT::CREATE_PICKUP(Pickup, -2010.901f, 2838.797f, 32.810f, 1, 1, 1, Pickup);
  69. set_status_text("Mr Robinson: Go to the military base and steal the big cargo plain. Then wait for further instructions.");
  70. PLAYER::SET_MAX_WANTED_LEVEL(2);
  71. UI::SET_NEW_WAYPOINT(-2010.901, 2838.797);
  72. GRAPHICS::DRAW_MARKER(2, -2010.901f, 2838.797f, 32.810f, 0.0f, 0.0f, 0.0f, 180.0f, 0.0f, 0.0f, 0.75f, 0.75f, 0.75f, 204, 204, 0, 100, false, true, 2, false, false, false, false);
  73. if (distance < 2)
  74. {
  75. set_status_text("Mr Robinson: GET TO THE DROPZONE!");
  76. UI::SET_NEW_WAYPOINT(-1294.469, -213.963);
  77. GRAPHICS::DRAW_MARKER(2, -1294.469f, -213.963f, 60.654f, 0.0f, 0.0f, 0.0f, 180.0f, 0.0f, 0.0f, 0.75f, 0.75f, 0.75f, 204, 204, 0, 100, false, true, 2, false, false, false, false);
  78. if (distance2 < 2)
  79. {
  80. PLAYER::CLEAR_PLAYER_WANTED_LEVEL(player);
  81. PED::SET_PED_MONEY(playerPed, 250000);
  82. set_status_text("Mr Robinson: Goodjob, come see me for more jobs.");
  83. }
  84. }
  85. }
  86. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement