Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,461 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

ES_SENCE

[C#] A problem with adding new blip.

Recommended Posts

ES_SENCE

Hello, guys.

I'm new here and making modding with C#.

I want to add new blip but I don't know why it doesn't work.

Here are my example codes:

private List<Blip> blips = new List<Blip>();blips.Add(World.CreateBlip(new Vector3(-80.7f, -1761.8f, 29.8f)));blips[0].Sprite = BlipSprite.JerryCan;blips[0].Color = BlipColor.White;blips[0].Scale = 0.7f;blips[0].Name = "Blip name";

That's it.

I've searched gtaforums but I couldn't get the solution.

If it's okay to you, please help me out of here.

Thank you for reading and have a great day.

Share this post


Link to post
Share on other sites
LeeC2202

Works fine for me

 

HAyT2p5.jpg

 

But here's the thing, you said "I want to add new blip but I don't know why it doesn't work."... that's it, that's pretty much all you said.

 

When you go to the doctor's, do you sit down and say "I'm not well" and then let them guess all the possible things that might be your illness, or do you describe what the problem is, where the problem is, what the symptoms are etc...?

 

I am genuinely curious as to what you thought we could possibly suggest as a solution, based on "it doesn't work", especially considering that it does in fact work. I could say "It's not a proper script" or "That piece of code on its own will never work" and both of those would be true. If I put that code into a .cs file and dropped it into the Scripts folder, nothing would happen. If I put it into a code file in Visual Studio, there would be errors all over the place... 62 errors to be precise. I dropped it into a working script and it worked with no problems.

 

The people who write scripts, who come on this forum, haven't got the time to ask question after question, to try and get some information. Just like a doctor won't sit there asking "Is it your leg? Is it your arm? Do you have a headache? Is anywhere bleeding?". So this type of question will generally get ignored... or it will generate a more than likely sarcastic response, because you are forcing people to make wild guesses as to what might not be working and nobody likes spending their time playing guessing games, when they could be writing code instead.

 

If you want people to diagnose your problem, then "it doesn't work" is just not enough... unless "it does work" is a good enough answer that is... because it does work, as you can see from the image.

Edited by LeeC2202

Share this post


Link to post
Share on other sites
ES_SENCE

Works fine for me

 

HAyT2p5.jpg

 

But here's the thing, you said "I want to add new blip but I don't know why it doesn't work."... that's it, that's pretty much all you said.

 

When you go to the doctor's, do you sit down and say "I'm not well" and then let them guess all the possible things that might be your illness, or do you describe what the problem is, where the problem is, what the symptoms are etc...?

 

I am genuinely curious as to what you thought we could possibly suggest as a solution, based on "it doesn't work", especially considering that it does in fact work. I could say "It's not a proper script" or "That piece of code on its own will never work" and both of those would be true. If I put that code into a .cs file and dropped it into the Scripts folder, nothing would happen. If I put it into a code file in Visual Studio, there would be errors all over the place... 62 errors to be precise. I dropped it into a working script and it worked with no problems.

 

The people who write scripts, who come on this forum, haven't got the time to ask question after question, to try and get some information. Just like a doctor won't sit there asking "Is it your leg? Is it your arm? Do you have a headache? Is anywhere bleeding?". So this type of question will generally get ignored... or it will generate a more than likely sarcastic response, because you are forcing people to make wild guesses as to what might not be working and nobody likes spending their time playing guessing games, when they could be writing code instead.

 

If you want people to diagnose your problem, then "it doesn't work" is just not enough... unless "it does work" is a good enough answer that is... because it does work, as you can see from the image.

 

Thank you for replying.

Yes you are right.

It didn't work because I made a logical error on the other line.

And I should have thought more before I post this thread.

I'm really sorry for bothering you.

I hope you would have a great day.

Edited by ES_SENCE

Share this post


Link to post
Share on other sites
LeeC2202

No problem, glad you got it sorted.

 

Just to reassure you, it was no bother for me to reply. The only reason I wrote that reply like that, is because I know how important it is for people to be able to get answers. So my aim was to try and help you achieve that, if you have any questions in the future.

 

Modding isn't easy and sometimes, even the best modders run into problems, or have questions. A question that gets ignored can be discouraging for the person who asked it and I am a strong believer in encouraging people to create.

Share this post


Link to post
Share on other sites
ES_SENCE

No problem, glad you got it sorted.

 

Just to reassure you, it was no bother for me to reply. The only reason I wrote that reply like that, is because I know how important it is for people to be able to get answers. So my aim was to try and help you achieve that, if you have any questions in the future.

 

Modding isn't easy and sometimes, even the best modders run into problems, or have questions. A question that gets ignored can be discouraging for the person who asked it and I am a strong believer in encouraging people to create.

Now I get it. Your comments mean a lot. I really appreciate them.

Yes you did encourage me. As this is first time I start modding, when I was stuck, I found those codes then inserted them into my script.

It seemed everything worked fine except those lines. So I thought those are invalid codes so I posted this thread.

But after seeing your answer, I could think my script was wrong not those codes. So thanks to you, I debuged my script then I found the way to work properly.

So I have to say thank you so much. If you didnt reply me, I would never find how to add blips.

Sorry for my bad english though, as a not native english person.

Thank you again for spending your time to help me and saving my time too.

Edited by ES_SENCE

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.