Modme Forums

ADD MAPNAME TO SCOREBOARD [LUA]

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: QuentinN33
[IMAGE] PREVIEW



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

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



ModmeBot:

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


ModmeBot:

Reply By: mathfag

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/