Modme

New Modme platform coming soon!
ADD MAPNAME TO SCOREBOARD [LUA]
Viewed 700 time(s)
Topic created on 1520974184
Original post
Modme User
18 wins

[IMAGE] PREVIEW

[TEXT TUTORIAL] To add your mapname on scoreboard, just paste the code on your lua file and change "MAPNAME" by your mapname :

[Spoilers] Show / Hide
    local ScoreBoardMapName = LUI.UIText.new(HudRef, InstanceRef)
    ScoreBoardMapName:setLeftRight(true, false, 245, 580)
    ScoreBoardMapName:setTopBottom(true, false, 265, 285)
    ScoreBoardMapName:setText("MAPNAME")

    local function ShowMapName(Unk1, Unk2, Unk3)
        if Engine.IsVisibilityBitSet(InstanceRef, Enum.UIVisibilityBit.BIT_SCOREBOARD_OPEN) then
            --ScoreBoardMapName:beginAnimation("keyframe", 500, true, true, CoD.TweenType.Linear)
            ScoreBoardMapName:setAlpha(1)
        else
            --ScoreBoardMapName:beginAnimation("keyframe", 500, true, true, CoD.TweenType.Linear)
            ScoreBoardMapName:setAlpha(0)
        end
    end

    ScoreBoardMapName:mergeStateConditions({{stateName = "Scoreboard", condition = ShowMapName}})

    local function OpenMapName(ModelRef)
        HudRef:updateElementState(ScoreBoardMapName, {name = "model_validation",
            menu = HudRef, modelValue = Engine.GetModelValue(ModelRef),
            modelName = "UIVisibilityBit." .. Enum.UIVisibilityBit.BIT_SCOREBOARD_OPEN})
    end

    ScoreBoardMapName:subscribeToModel(Engine.GetModel(Engine.GetModelForController(InstanceRef), "UIVisibilityBit." .. Enum.UIVisibilityBit.BIT_SCOREBOARD_OPEN), OpenMapName)

    HudRef:addElement(ScoreBoardMapName)

VIDEO TUTORIAL


[h1]Yo ![/h1]
Reply #1 on 1521431645
Modme User
1 wins

where can I find my lua file? is it shared between all maps or individual for each?

Reply #2 on 1521465312
Modme User
37 wins

KillJoyYT

where can I find my lua file? is it shared between all maps or individual for each?

 http://phabricator.aviacreations.com/w/black_ops_3/lua_%28lui%29/menu_examples/


Don't PM me about stuff that should be on the forum.
My creations:
Debug (on/off)
Jukebox
Gum Anti-cheat
Kino box locator
Elemental Bows

Test search engine for this site via Google