Hello all, sorry my english is not good, i'm french.
I use 2much4u base sprx and i have some probleme with "teleporte to waypoint".
void TeleportToWaypoint()
{
uint handle = PLAYER::PLAYER_PED_ID();
if (PED::IS_PED_IN_ANY_VEHICLE(handle, 0))
handle = PED::GET_VEHICLE_PED_IS_IN(handle, 0);
if (UI::IS_WAYPOINT_ACTIVE())
{
Vector3 pos;
float z;
CAM::DO_SCREEN_FADE_OUT(200);
pos = UI::GET_BLIP_INFO_ID_COORD(UI::GET_FIRST_BLIP_INFO_ID(UI::_GET_BLIP_INFO_ID_ITERATOR()));
GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(pos.x,pos.y,pos.z,&z);
SYSTEM::WAIT(3000);
ENTITY::SET_ENTITY_COORDS(handle,pos.x,pos.y,z,1,0,0,1);
CAM::DO_SCREEN_FADE_IN(200);
}
else
{
drawNotification("Mets 1 point !!!!");
}
}
But ground_z in never good, someone for help ?
Thanks.