YossiBz Posted September 1, 2014 Author Share Posted September 1, 2014 There may be some way to get all the blips currently on the map... like how the Taxi does it. In the taxi you can scroll through all blips and waypoints, so maybe you can figure out how the taxi does that and use similar code to get the blips you need to teleport to. I'm not sure how to do that or if you can do it, but just a possible idea.I do a loop for all the blip as found but I can't to get there position And I do in C# Link to comment Share on other sites More sharing options...
DaBOSS54320 Posted September 1, 2014 Share Posted September 1, 2014 Blips have a Position member, so it should be as simple as writing blip.Position. Player has a member for teleporting, so you can also use Player.TeleportTo(blip.Position). Or just change the Position of Player.Character, I think TeleportTo works a bit better though. GetAllBlipsOfType(BlipType.Contact) or GetAllBlipsOfType(BlipType.Ped) should probably be used for getting the blips. Link to comment Share on other sites More sharing options...
Skorpro Posted September 2, 2014 Share Posted September 2, 2014 Here is the C++ solution Vector3 GetBlipCoords(eBlipSprite blipSprite){ Vector3 gbc_vec; Blip gbc_blip = GetFirstBlipInfoId(blipSprite); if(gbc_blip.IsValid()) { GetBlipCoords(gbc_blip, &gbc_vec); for (;gbc_vec.Z == 0.0f;) { GetGroundZFor3DCoord(gbc_vec.X, gbc_vec.Y, 1000.0f, &gbc_vec.Z); Wait(0); } } else { gbc_vec.X = 0.0f; // Set alternative coords here gbc_vec.Y = 0.0f; gbc_vec.Z = 0.0f; PrintStringWithLiteralStringNow("STRING", "Blip NOT found!", 2000, 1); } return gbc_vec;}// ...Vector3 vec;vec = GetBlipCoords(BLIP_ELIZABETA);SetCharCoordinates(GetPlayerPed(), vec.X, vec.Y, vec.Z); leftas and Wiebrendh 2 Link to comment Share on other sites More sharing options...
Jitnaught Posted September 2, 2014 Share Posted September 2, 2014 And the .NET (C#) version: Vector3 GetBlipCoords(BlipIcon blipIcon) { Vector3 gbc_vec; Blip gbc_blip = GTA.Native.Function.Call<Blip>("GET_FIRST_BLIP_INFO_ID", (int)blipIcon); if (Game.Exists(gbc_blip)) { gbc_vec = gbc_blip.Position; while (gbc_vec.Z != 0.0f) { gbc_vec = gbc_vec.ToGround(); Wait(0); } } else { gbc_vec = new Vector3(0, 0, 0); GTA.Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Blip NOT found!", 2000, 1); } return gbc_vec; }Vector3 vec = GetBlipCoords(BlipIcon.Person_Elizabeta);if (vec != Vector3.Zero) Player.Character.Position = vec; leftas 1 Link to comment Share on other sites More sharing options...
YossiBz Posted September 2, 2014 Author Share Posted September 2, 2014 (edited) Tnx but this not teleport me Edited September 2, 2014 by YossiBz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now