Advertisement
TANAKAM

ミッションマーカーテレポート Zedd

Jan 24th, 2022 (edited)
1,379
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vector3 GetBlipIcon(int index, int color)
  2. {
  3.     static Vector3 zero;
  4.     Vector3 coords;
  5.     bool blipFound = false;
  6.     for (Blip i = UI::GET_FIRST_BLIP_INFO_ID(index); UI::DOES_BLIP_EXIST(i) != 0; i = UI::GET_NEXT_BLIP_INFO_ID(index))
  7.     {
  8.         if (UI::GET_BLIP_COLOUR(i) == color)
  9.         {
  10.             coords = UI::GET_BLIP_INFO_ID_COORD(i);
  11.             blipFound = true;
  12.             break;
  13.         }
  14.     }
  15.     if (blipFound) return coords;
  16.     return zero;
  17. }
  18.  
  19. void teleportmissionmarker(int index)
  20. {
  21.     Vector3 Coords = GetBlipIcon(index, 5);
  22.     if (Coords.x != 0 && Coords.y != 0)
  23.     {
  24.         if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), 0))
  25.         {
  26.             int vehid = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0);
  27.             ENTITY::SET_ENTITY_COORDS(vehid, Coords.x, Coords.y, Coords.z, 1, 0, 0, 1);
  28.         }
  29.         else
  30.         {
  31.             ENTITY::SET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), Coords.x, Coords.y, Coords.z, 1, 0, 0, 1);
  32.         }
  33.     }
  34. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement