Log in to reply

World.GetAllBlips(BlipSprite) doesn't return any blips, not working as intended.

  • Hello fellow programmers !
    I'm fairly new to GTA 5 scripting (started just about 10 days ago), I've released one script so far - https://www.gta5-mods.com/scripts/custom-blips
    Do check it out, it might be useful to you.

    Anyway, some people requested me to add a functionality to edit other blips (not created by my script).
    I figured it would be easy as there's already a function to GetAllBlips, but that's not working properly.
    It doesn't return values like it should and the array is always empty.

    I spent some time on it & this is the best I came up with -

    private void TryGetAllBlips()
    List<Blip> AllBlips = new List<Blip>();
    Blip blip;

            foreach(BlipSprite blipSprite in Enum.GetValues(typeof(BlipSprite)))
                    blip = Function.Call<Blip>(Hash.GET_NEXT_BLIP_INFO_ID, blipSprite);
                    WriteToLog(LogType.Log, blip.Sprite.ToString() + blip.Position.ToString() + " checking & adding to list");
                    if (blip.Position != Vector3.Zero)
                        WriteToLog(LogType.Log, "Added");
                } while (blip.Position != Vector3.Zero);

    This still doesn't give me all the blips, but just a few Barber blips, a few LosSantosCustoms & a couple of Lift blips, these are just names as I get empty string when I try to get the Name of any blip either by blip.name or by blip.getappropriatename().
    And name is another problem for another day as that can be worked around, but not getting blip handles is really getting to me.
    I've also tried getting all entities & reading the blips from them, still nothing.

    Is there a solution..?? Can someone tell me what I'm missing..??

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.