A RedM Snippet to Use Native Legendary Animals Map

Published on
1 mins read
--- views
Use Native Legendary Animals Map in RedM

This snippet provides a way to use the native legenday animals map from the original RDR2 game.

local function LegendaryMap()
    local flowblockHash = -980176693
    local flowblockEnteringHash = -980176693
    local flowblock = UiflowblockRequest(flowblockHash)
    local statemachineHash = 978408792
    repeat Wait(0) until UiflowblockIsLoaded(flowblock) == 1
    UiflowblockEnter(flowblock, flowblockEnteringHash)
    if (UiStateMachineExists(statemachineHash) == 0) then
        UiStateMachineCreate(statemachineHash, flowblock)
    end
    
    if DBD?.a then 
        DatabindingRemoveDataEntry(DBD.a)
    end
    DBD = {}
    DBD.a = DatabindingAddDataContainerFromPath("", "DynamicAnimalMap")
    local nr = 0
    while (nr < 28) do 
        local txt = "Zone"..(nr+1)
        local str = GetTextSubstring_2(txt, GetLengthOfLiteralString(txt))
        DBD.b = DatabindingAddDataContainer(DBD.a, str)
        DBD.c = DatabindingAddDataHash(DBD.b, "animalType", -317373141)
        DBD.d = DatabindingAddDataBool(DBD.b, "isVisible", true)
        nr += 1
        Wait(1)
    end
    StartTaskItemInteraction(PlayerPedId(), 17745825, 889797228, 1, 0, -1082130432)
end

Join Our Community!

Get help, share ideas, get free scripts, and connect with other RedM enthusiasts in our Discord server.

Join Discord