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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

qiangqiang101

[.NET] How to rename a blip?

Recommended Posts

qiangqiang101

Add this:

    Private Sub SetBlipName(ByVal BlipString As String, ByVal BlipName As Blip)        Dim arguments As InputArgument() = New InputArgument() {"STRING"}        Native.Function.Call(Hash._0xF9113A30DE5C6670, arguments)        Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, BlipString)        Native.Function.Call(Hash._0xBC38B49BCB83BC9B, BlipName)    End Sub

Usage:

SetBlipName("Name", Blip)

Edited by qiangqiang101

Share this post


Link to post
Share on other sites
Jitnaught

I don't think you can set it to a custom name. It looks like it uses the "blipname" string to search through a text file, from which it gets the actual string which will be used as the name (confusing explanation but hopefully you will get it).

 

pFKxrmT.png

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
DaBOSS54320

The text functions did that to, and you had to use _ADD_TEXT_COMPONENT_STRING("string") to set the "STRING" thing. Maybe this'll work the same? Or maybe there is another function for it.

Share this post


Link to post
Share on other sites
qiangqiang101

I don't think you can set it to a custom name. It looks like it uses the "blipname" string to search through a text file, from which it gets the actual string which will be used as the name (confusing explanation but hopefully you will get it).

 

pFKxrmT.png

 

where do you get this list?

Share this post


Link to post
Share on other sites
ISOFX

 

I don't think you can set it to a custom name. It looks like it uses the "blipname" string to search through a text file, from which it gets the actual string which will be used as the name (confusing explanation but hopefully you will get it).

 

pFKxrmT.png

 

where do you get this list?

 

The list in the picture he got from decompiled scripts. :D

Share this post


Link to post
Share on other sites
Jitnaught

It's from a program I made that searches through the decompiled scripts (like ISOFX said). :)

Share this post


Link to post
Share on other sites
qiangqiang101

It's from a program I made that searches through the decompiled scripts (like ISOFX said). :)

 

Can I have full list of blip name?

Share this post


Link to post
Share on other sites
Jitnaught

Too lazy to search through the whole list for just the strings, or write a program to do that, so I'll just give you the whole list (the one I sent the picture of a couple days ago).

http://pastebin.com/YAyRYxkC

(I may go through the list and get just the strings later though.)

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
qiangqiang101

@jedijosh managed to name his blip to his mod name: https://www.gta5-mods.com/scripts/animal-ark-shelter

you might wanna ask him...

Yes, i asked him, he said there is actually a name called AnimalArk in the game, but somehow rockstar removed it.

Share this post


Link to post
Share on other sites
GeorgeZhang

 

@jedijosh managed to name his blip to his mod name: https://www.gta5-mods.com/scripts/animal-ark-shelter

you might wanna ask him...

Yes, i asked him, he said there is actually a name called AnimalArk in the game, but somehow rockstar removed it.ok, that's unfortunate. hope someone can make it happen:)

Share this post


Link to post
Share on other sites
qiangqiang101

 

 

@jedijosh managed to name his blip to his mod name: https://www.gta5-mods.com/scripts/animal-ark-shelter

you might wanna ask him...

Yes, i asked him, he said there is actually a name called AnimalArk in the game, but somehow rockstar removed it.
ok, that's unfortunate. hope someone can make it happen:)

 

in previous GTA4 can just use blip.name = "custom name", donno why cant be happen in GTA5

Share this post


Link to post
Share on other sites
Dilapidated

I don't think you can set it to a custom name. It looks like it uses the "blipname" string to search through a text file, from which it gets the actual string which will be used as the name (confusing explanation but hopefully you will get it).

 

pFKxrmT.png

 

When you say.... "It looks like it uses the "blipname" string to search through a text file, from which it gets the actual string which will be used as the name." Is there a specific text file it looks at? There must be a master file somewhere that contains all the available blip names. Perhaps if we can find it we can amend the list to create custom blip names?

Share this post


Link to post
Share on other sites
Jitnaught

I was just guessing that it looks through a file. The strings could be stored within the GTA V program itself.

Share this post


Link to post
Share on other sites
Dilapidated

That was my guess as well. I've done a lot of searching but haven't found anything yet. I thought that maybe blip_controller.c4 would provide some hints but no luck there either.

 

I'm working on a project with a team and we have plenty of blip names that we've been lucky enough to add however we have some custom models we've created and would like to have custom blip names for them. Here's a look at it so far.

 

52v0AnY.jpg

 

 

We're also trying to figure out blip directional rotation which is another issue in itself... but as you can see a lot has been done, just sucks that we can't complete this list due to some stupid txt file somewhere.

Edited by Dilapidation

Share this post


Link to post
Share on other sites
Dilapidated

So some news for those who are still wondering how to make custom blip names. I have the answer!

 

Add the name to this file: global.gxt2

Location of file is \update\update.rpf\x64\data\lang\american_rel.rpf\global.gxt2

 

All you have to do is add a line like this to global.gxt2
Tank = (enter text here)

Example: Tank = M1A2 Abrams

 

Then set CurrentBlip, "Tank" in your script.

In game it should then appear as "M1A2 Abrams"

 

Enjoy :)

Share this post


Link to post
Share on other sites
bilago

This is the code Dilapidation and I use to make this work (C# Dot Net)

    /// <summary>    /// Sets the text and legend details of a blip on the minimap    /// </summary>    /// <param name="B">Blip to assign</param>    /// <param name="text">Text to display</param>    /// <param name="category"> Legend Details:    ///1 = No Text on blip or Distance    ///2 = Text on blip    ///3 = No text, just distance    ///4 = No Text on blip or distance    ///5 = No Text on blip or distance    ///6 = Text with no distance on vehicles/nothing on peds</param>    public static void setBlipText(Blip B, string text, int category)    {        UInt64 blipTextHash = 0xEAA0FFE120D92784;        Function.Call((Hash)blipTextHash, B, (InputArgument)text);        Function.Call(Hash.SET_BLIP_CATEGORY, B, category);    }

Share this post


Link to post
Share on other sites
jedijosh920

 

This is the code Dilapidation and I use to make this work (C# Dot Net)

 

    /// <summary>    /// Sets the text and legend details of a blip on the minimap    /// </summary>    /// <param name="B">Blip to assign</param>    /// <param name="text">Text to display</param>    /// <param name="category"> Legend Details:    ///1 = No Text on blip or Distance    ///2 = Text on blip    ///3 = No text, just distance    ///4 = No Text on blip or distance    ///5 = No Text on blip or distance    ///6 = Text with no distance on vehicles/nothing on peds</param>    public static void setBlipText(Blip B, string text, int category)    {        UInt64 blipTextHash = 0xEAA0FFE120D92784;        Function.Call((Hash)blipTextHash, B, (InputArgument)text);        Function.Call(Hash.SET_BLIP_CATEGORY, B, category);    }

 

This method is cool if you find a good localized string and get lucky but adding strings like that Tank one is not good/effecient at all because some people don't want to mess with RPFs just for one or two strings. I figured out a way to add/push text components so they are used as localized strings, testing it with blips soon but it works for display help notifications and other UI stuff Rockstar uses.

Share this post


Link to post
Share on other sites
bilago

 

 

This is the code Dilapidation and I use to make this work (C# Dot Net)

 

    /// <summary>    /// Sets the text and legend details of a blip on the minimap    /// </summary>    /// <param name="B">Blip to assign</param>    /// <param name="text">Text to display</param>    /// <param name="category"> Legend Details:    ///1 = No Text on blip or Distance    ///2 = Text on blip    ///3 = No text, just distance    ///4 = No Text on blip or distance    ///5 = No Text on blip or distance    ///6 = Text with no distance on vehicles/nothing on peds</param>    public static void setBlipText(Blip B, string text, int category)    {        UInt64 blipTextHash = 0xEAA0FFE120D92784;        Function.Call((Hash)blipTextHash, B, (InputArgument)text);        Function.Call(Hash.SET_BLIP_CATEGORY, B, category);    }

 

This method is cool if you find a good localized string and get lucky but adding strings like that Tank one is not good/effecient at all because some people don't want to mess with RPFs just for one or two strings. I figured out a way to add/push text components so they are used as localized strings, testing it with blips soon but it works for display help notifications and other UI stuff Rockstar uses.

 

 

Please share if it works! We're already doing RPF edits for the mod so its not that big of a deal to add them in our case

Share this post


Link to post
Share on other sites
Eddlm
UI::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING");UI::_ADD_TEXT_COMPONENT_STRING("Name");UI::END_TEXT_COMMAND_SET_BLIP_NAME(blip);GTA.Native.Function.Call(GTA.Native.Hash._0xF9113A30DE5C6670, "STRING");GTA.Native.Function.Call(GTA.Native.Hash._ADD_TEXT_COMPONENT_STRING, "Name");GTA.Native.Function.Call(GTA.Native.Hash._0xBC38B49BCB83BC9B, blip);

kLrZu.jpg

Share this post


Link to post
Share on other sites
FowardElement

Thanks Eddlm. That works perfect!

Share this post


Link to post
Share on other sites
qiangqiang101
UI::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING");UI::_ADD_TEXT_COMPONENT_STRING("Name");UI::END_TEXT_COMMAND_SET_BLIP_NAME(blip);GTA.Native.Function.Call(GTA.Native.Hash._0xF9113A30DE5C6670, "STRING");GTA.Native.Function.Call(GTA.Native.Hash._ADD_TEXT_COMPONENT_STRING, "Name");GTA.Native.Function.Call(GTA.Native.Hash._0xBC38B49BCB83BC9B, blip);

kLrZu.jpg

 

 

Thanks, I made a function like this

 

    Private Sub SetBlipName(ByVal BlipString As String, ByVal BlipName As Blip)        Dim arguments As InputArgument() = New InputArgument() {"STRING"}        Native.Function.Call(Hash._0xF9113A30DE5C6670, arguments)        Native.Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, BlipString)        Native.Function.Call(Hash._0xBC38B49BCB83BC9B, BlipName)    End Sub

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.
Note: Your post will require moderator approval before it will be visible.

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.