YossiBz Posted August 31, 2014 Share Posted August 31, 2014 this is my code to teleport but its give me error: Blip myBlip = null; myBlip.Icon = BlipIcon.Person_Elizabeta; float x = myBlip.Position.X; float y = myBlip.Position.Y; float z = myBlip.Position.Z; Player.Character.Position = new Vector3(x, y, z); Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 (edited) Well yea,first of all you haven't initialize your blip. second you why you doing hardcore way of getting vector3 ? Best regards, Paul. Edited August 31, 2014 by leftas Link to comment Share on other sites More sharing options...
Jitnaught Posted August 31, 2014 Share Posted August 31, 2014 Instead of: = null, do: = Blip.AddBlip. Instead of all of those floats, use: Vector3 position = myBlip.Position. Instead of: = new Vector3(...), do: = position. Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 I think he want to attach blip for ped so. Blip myBlip = ped.AttachBlip(); Best regards, Paul. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 I think he want to attach blip for ped so. Blip myBlip = ped.AttachBlip(); Best regards, Paul. no i try do teleport to missions Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 The blip isn't attached and has no position. Attach it to the ped position and teleport the player to the same position. Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 Okay, sorry, so do like LetsPlayOrDy said. Again, sorry! Best regards, Paul. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 (edited) Instead of: = null, do: = Blip.AddBlip. Instead of all of those floats, use: Vector3 position = myBlip.Position. Instead of: = new Vector3(...), do: = position. i try this but is give me error on Blip.AddBlip Edited August 31, 2014 by YossiBz Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 What kind of error? Any details would be appreciated, y'know... Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 What kind of error? Any details would be appreciated, y'know... this is the code: Blip myBlip = Blip.AddBlip(); myBlip.Icon = BlipIcon.Person_Elizabeta; Vector3 position = myBlip.Position; Player.Character.Position = position; this the error: Error 1 No overload for method 'AddBlip' takes 0 arguments C:\Users\Yossi\Desktop\Trainer\GTAIV\GTAIV.cs 671 59 TrainerDotNet.net Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 Again, blip is attached to nothing. Do this Blip myBlip = Blip.AddBlip(your_ped); Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 Again, blip is attached to nothing. Do this Blip myBlip = Blip.AddBlip(your_ped); its not ped its blip like E for eizabela Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 Again, blip is attached to nothing. Do this Blip myBlip = Blip.AddBlip(your_ped); its not ped its blip like E for eizabela You have to attach it to a ped first... Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 Again, blip is attached to nothing. Do this Blip myBlip = Blip.AddBlip(your_ped); its not ped its blip like E for eizabela You have to attach it to a ped first... like this Blip myBlip = Blip.AddBlip(Player.Character);? Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. i dont have specific coord i need to get blip coord Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. Oh, sorry then but still he doesn't seem to understand. Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. i dont have specific coord i need to get blip coord Blip coords are null, you need to tell the game where you want the blip to be positioned. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. Oh, sorry then but still he doesn't seem to understand. Noox, you don't need to attach to create blip. OP, you need to Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" Best regards, Paul. i dont have specific coord i need to get blip coord Blip coords are null, you need to tell the game where you want the blip to be positioned. so how i do this? Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 Leftas gave you everything you need. Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 You need to set cordinates for blip with Blip myBlip = Blip.AddBlip(your cordinates); // if you want specific cordinates "new vector(0,0,0);" and then you will can get position from blip. btw. You may need to read C# tutorials Best regards, Paul. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 its just add blip i need to teleport to the blip not to create blip Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 its just add blip i need to teleport to the blip not to create blip How can you teleport to the blip if the blip doesn't exist? Link to comment Share on other sites More sharing options...
leftas Posted August 31, 2014 Share Posted August 31, 2014 (edited) DO YOU WANT TO TELEPORT TO GAME CREATED BLIP?!?? strange day... Best regards, Paul. Edited August 31, 2014 by leftas Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 DO YOU WANT TO TELEPORT TO GAME CREATED BLIP?!?? strange day... Best regards, Paul. yes! Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 You want to teleport to Elizabeta? Where her missions start? Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 You want to teleport to Elizabeta? Where her missions start? yes! Link to comment Share on other sites More sharing options...
Noox Posted August 31, 2014 Share Posted August 31, 2014 You want to teleport to Elizabeta? Where her missions start? yes! Oh well, that's very easy. You don't need blips, what you want to do can't be done with blips. You have to go where the mission starts, open the console and write showposition or something like that, copy the coordinates and via script teleport the player to that position. I'm sure someone will give code to you, I would but I haven't modded for a while so I don't exactly remember the right keywords. Link to comment Share on other sites More sharing options...
YossiBz Posted August 31, 2014 Author Share Posted August 31, 2014 tnx a lot Link to comment Share on other sites More sharing options...
byteMe420 Posted August 31, 2014 Share Posted August 31, 2014 are u coding in notepad? Link to comment Share on other sites More sharing options...
DaBOSS54320 Posted September 1, 2014 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. 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