1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

How to remove BECOME bottom form "Material F4" ?

Discussion in 'DarkRP Modding Questions & Help' started by hwplays, Feb 19, 2016.

?

remove BECOME bottom

  1. remove become text?

    0 vote(s)
    0.0%
  2. don't use material f4 :(

    0 vote(s)
    0.0%
  1. hwplays

    hwplays New Member

    Code (Text):

        local become = matcore.MakeFlatButton(content, Color(0,0,0,0), Config.Click1, Config.Click2, Config.HeaderColor, true)
        become:DockMargin(16+8,8,8,8)
        become:Dock(BOTTOM)
        become:SetText("BECOME")
        /*
            Right panel content end
        */

        local btns = { }

        // Jobs
        function main:UpdateList(tofind)
            local jobs = { }
            for k, v in pairs(DarkRP.getCategories().jobs) do
                for k2, v2 in pairs(v.members) do
                    if (!tofind || tofind == "" || v2.name:lower():find(tofind)) then
                        jobs[#jobs+1] = v2
                    end
                end
            end

            btns = { }
            lst:Clear()

            for k, v in pairs(jobs) do
                if (!v.admin || (v.admin == 1 && !(LocalPlayer():IsAdmin() || LocalPlayer():IsSuperAdmin()) || v.admin == 2 && !LocalPlayer():IsSuperAdmin())) then continue end

                local btn = matcore.MakeFlatButton(lst, Color(0,0,0,0), Config.Click1, Config.Click2, Color(0,0,0,0), false)
                btns[#btns+1] = btn
                btn:SetHeight(96+32)
                btn:DockPadding(0,16,0,16)
                btn:DockMargin(0,-16,0,-16)
                btn:Dock(TOP)
                btn.hoveranim = 0
                function btn:Paint(w, h)
                    local x1, y1 = self:LocalToScreen(0,16)
                    local x2, y2 = self:LocalToScreen(w, h-16)
                    render.SetScissorRect(x1, y1, x2, y2, true)
                    draw.RoundedBox(0, 0, 0, w, h, self.bgColor)

                    local factor = math.sin(self.anim)

                    draw.RoundedBox(0, 0, 0, w, h, Color(self.clickColor1.r, self.clickColor1.g, self.clickColor1.b, self.clickColor1.a*factor))
                    matcore.DrawCircle(self.mouseX, self.mouseY, math.sqrt(math.sqrt(3.14-self.anim)*10)*50, Color(self.clickColor2.r, self.clickColor2.g, self.clickColor2.b, self.clickColor2.a*math.sin(math.min(self.anim,3.14/2))))

                    if self.hoverAnim then
                        draw.RoundedBox(0, 0, 0, w, h, Color(self.clickColor1.r, self.clickColor1.g, self.clickColor1.b, self.clickColor1.a*0.3*self.hAnim))
                    end
                    render.SetScissorRect(0, 0, 0, 0, false)
                end
                function btn:PaintOver(w, h)
                    //draw.RoundedBox(0,96+8,h-1,w,1,Color(120,120,120, 50))
                    if self.hoveranim > 1 then
                        matcore.DrawShadowC(0,16,w,h-32,false,true,false,true,self.hoveranim)
                        matcore.DrawShadowC(0,16,w,h-32,false,true,false,true,self.hoveranim)
                    end
                    self.hoveranim = Lerp(FrameTime()*15, self.hoveranim, (self:IsHovered() || self.hold) and 16 or 0)
                end
                function btn:DoClick()
                    for key, btn in pairs(btns) do
                        btn.hold = false
                    end
                    self.hold = true

                    content:SetVisible(true)
                    header:SetText(v.name)
                    desc:SetText(v.description)
                    timer.Simple(0.1, function()
                        desc:SizeToContentsY()
                    end)
                    jicon:SetModel(istable(v.model) and v.model[1] or v.model)
                    dp.tpos = 0
                    function become:DoClick()
                        local tm = LocalPlayer():Team()

                        RunConsoleCommand("say", "/" .. (v.vote and "vote" or "") .. v.command)

                        timer.Simple(0.5, function()
                            if tm != LocalPlayer():Team() then
                                MF4:Remove()
                            end
                        end)
                    end
                    become:SetText(v.vote and "CREATE VOTE" or "BECOME")
                end
     
     
  2. Alien_Halls

    Alien_Halls New Member

    [​IMG] The owner of this addon already made an update that comes without the "Become Button".

    Download it.
     

Share This Page