Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. 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. News

    2. Forum Support

    3. 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
Guest

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 Guest

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
Guest

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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