ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1471

PC Teleport To Objective Help

by shandor96 - 09-30-2018 - 08:19 AM
#1
What wrong here?


void teleport_to_objective()
{
Vector3 coords;
Entity e;
Ped playerPed = PLAYER::PLAYER_PED_ID();
if (PED::IS_PED_IN_ANY_VEHICLE(playerPed, FALSE))
e = PED::GET_VEHICLE_PED_IS_USING(playerPed);
else e = playerPed;

bool blipFound = false;

if (ENTITY::IS_ENTITY_A_VEHICLE(e)) RequestControlOfEnt(e);
for (int i = 0; i <= 1000; i++)
{
Blip_t* blip = Hooking::GetBlipList()->m_Blips[i];
if (blip)
{
if ((blip->dwColor == ColorYellowMission && blip->iIcon == SpriteStandard) || (blip->dwColor == ColorYellow && blip->iIcon == SpriteStandard) ||
(blip->dwColor == ColorWhite && blip->iIcon == SpriteRaceFinish) || (blip->dwColor == ColorGreen && blip->iIcon == SpriteStandard) || (blip->iIcon == SpriteCrateDrop)) {
coords = blip->coords;
blipFound = true;
break;
}
}
}

blipFound ? teleport_to_coords(e, coords) : notifyMap("~y~Objective not found!", 0);

}
Reply

Users browsing: 1 Guest(s)