Jump to content

scoreboard


ViRuZGamiing

Recommended Posts

local text_h = dxGetFontHeight ( 1, "bankgothic" ) 
  
addEventHandler("onClientRender",root, 
    function ( ) 
        local name_X = 350 
        local team_X = 700 
        local ping_X = 950 
        local name_Y = 200 
        local namend_Y = 700 
  
        if ( not getKeyState ( "tab" ) ) then 
            return 
        end 
  
        if ( name_Y > namend_Y ) then 
            return 
        end 
  
        dxDrawRectangle(250, 100, 800, 600, tocolor(0, 100, 255, 150), false) 
        dxDrawText("Belgium-Reallife", 250, 100, 1050, 200, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) 
        dxDrawLine(250, 200, 1050, 200, tocolor(255, 255, 255, 255), 1, false) 
        dxDrawLine(550, 200, 550, 700, tocolor(255, 255, 255, 255), 1, false) 
        dxDrawLine(850, 200, 850, 700, tocolor(255, 255, 255, 255), 1, false) 
        --dxDrawText("Team1", 550, 200, 850, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        --dxDrawText("Ping1", 850, 200, 1050, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
  
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            dxDrawText ( getPlayerName ( player ), name_X, name_Y, name_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
            dxDrawText ( tostring ( getPlayerPing ( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
           dxDrawText ( tostring ( getPlayerTeam( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
            name_Y = ( name_Y + text_h * 1.5 ) 
        end 
    end 
) 

@TAPL wouldn't this work too?

Link to comment
local text_h = dxGetFontHeight ( 1, "bankgothic" ) 
  
addEventHandler("onClientRender",root, 
    function ( ) 
        local name_X = 350 
        local team_X = 700 
        local ping_X = 950 
        local name_Y = 200 
        local namend_Y = 700 
  
        if ( not getKeyState ( "tab" ) ) then 
            return 
        end 
  
        if ( name_Y > namend_Y ) then 
            return 
        end 
  
        dxDrawRectangle(250, 100, 800, 600, tocolor(0, 100, 255, 150), false) 
        dxDrawText("Belgium-Reallife", 250, 100, 1050, 200, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) 
        dxDrawLine(250, 200, 1050, 200, tocolor(255, 255, 255, 255), 1, false) 
        dxDrawLine(550, 200, 550, 700, tocolor(255, 255, 255, 255), 1, false) 
        dxDrawLine(850, 200, 850, 700, tocolor(255, 255, 255, 255), 1, false) 
        --dxDrawText("Team1", 550, 200, 850, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        --dxDrawText("Ping1", 850, 200, 1050, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
  
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            dxDrawText ( getPlayerName ( player ), name_X, name_Y, name_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
            dxDrawText ( tostring ( getPlayerPing ( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
           dxDrawText ( tostring ( getTeamName(getPlayerTeam( player )) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) 
            name_Y = ( name_Y + text_h * 1.5 ) 
        end 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...