Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void process_main_menu()
- {
- const float lineWidth = 250.0;
- const int lineCount = 7;
- std::string caption = "MORE HEISTS!";
- static LPCSTR lineCaption[lineCount] = {
- "HEIST #1",
- "WEAPON",
- "VEHICLE",
- "WORLD",
- "TIME",
- "WEATHER",
- "MISC"
- };
- DWORD waitTime = 150;
- while (true)
- {
- // timed menu draw, used for pause after active line switch
- DWORD maxTickCount = GetTickCount() + waitTime;
- do
- {
- // draw menu
- draw_menu_line(caption, lineWidth, 15.0, 18.0, 0.0, 5.0, false, true);
- for (int i = 0; i < lineCount; i++)
- if (i != activeLineIndexMain)
- draw_menu_line(lineCaption[i], lineWidth, 9.0, 60.0 + i * 36.0, 0.0, 9.0, false, false);
- draw_menu_line(lineCaption[activeLineIndexMain], lineWidth + 1.0, 11.0, 56.0 + activeLineIndexMain * 36.0, 0.0, 7.0, true, false);
- update_features();
- WAIT(0);
- } while (GetTickCount() < maxTickCount);
- waitTime = 0;
- // process buttons
- bool bSelect, bBack, bUp, bDown;
- get_button_state(&bSelect, &bBack, &bUp, &bDown, NULL, NULL);
- if (bSelect)
- {
- switch (activeLineIndexMain)
- {
- case 0:
- {
- int distance, distance2;
- Ped playerPed = PLAYER::PLAYER_PED_ID();
- Player player = PLAYER::PLAYER_ID();
- Vector3 position = ENTITY::GET_ENTITY_COORDS(playerPed, 1);
- distance = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(position.x, position.y, position.z, -2010.901f, 2838.797f, 32.810f, 1);
- distance2 = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(position.x, position.y, position.z, -1294.469f, -213.963f, 60.654f, 1);
- int Pickup = GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_CASE");
- int l_11A1 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 1);
- int Plane = GAMEPLAY::GET_HASH_KEY("cargoplane");
- STREAMING::REQUEST_MODEL(Plane);
- while (STREAMING::HAS_MODEL_LOADED(Plane))
- {
- WAIT(0);
- }
- Vehicle PlaneNoEntry = VEHICLE::CREATE_VEHICLE(Plane, -2018.499f, 2865.134f, 32.905f, 180, 1, 1);
- VEHICLE::SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(l_11A1, 1);
- STREAMING::REQUEST_MODEL(Plane);
- while (STREAMING::HAS_MODEL_LOADED(Plane))
- {
- WAIT(0);
- }
- OBJECT::CREATE_PICKUP(Pickup, -2010.901f, 2838.797f, 32.810f, 1, 1, 1, Pickup);
- set_status_text("Mr Robinson: Go to the military base and steal the big cargo plain. Then wait for further instructions.");
- PLAYER::SET_MAX_WANTED_LEVEL(2);
- UI::SET_NEW_WAYPOINT(-2010.901, 2838.797);
- 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);
- if (distance < 2)
- {
- set_status_text("Mr Robinson: GET TO THE DROPZONE!");
- UI::SET_NEW_WAYPOINT(-1294.469, -213.963);
- 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);
- if (distance2 < 2)
- {
- PLAYER::CLEAR_PLAYER_WANTED_LEVEL(player);
- PED::SET_PED_MONEY(playerPed, 250000);
- set_status_text("Mr Robinson: Goodjob, come see me for more jobs.");
- }
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement