Karuzo Posted February 10, 2014 Share Posted February 10, 2014 Hey Guys, So i have a problem with my dxDrawn Scoreboard. I want to make +2 on the Y-Axis for every player. here's my code: local playerheight = 10 local players = getElementsByType ( "player" ) local playas = 0 for amt, player in pairs(players) do playas = playas + 1 if (playas <= 20) then local ping = getPlayerPing(player) if (ping >= 250) then r,g,b = 255,0,0 elseif (ping >= 120) then r,g,b = 255,69,0 else r,g,b = 0,255,0 end dxDrawText(getPlayerName ( player ), X+60,Y+10*playerheight, Width,Height, tocolor(255,255,255), 1 , "default","center", "center",false, false,true,true) Link to comment
Bonsai Posted February 10, 2014 Share Posted February 10, 2014 +2? I don't understand what u mean, or what u tried yet. Link to comment
Karuzo Posted February 10, 2014 Author Share Posted February 10, 2014 Sorry , i mean : I want to show all player names on the scoreboard. So i can't really show all players on one position. So i want to make a gap between the 1st player and the 2nd player and so on. Link to comment
Bonsai Posted February 10, 2014 Share Posted February 10, 2014 Why you u multiply 10*playerHeight, which is also 10? Just do y+(playerHeight*index). (amt in your code) Then firstplayer gets 1*10, second 2*10, which puts them into an order. Link to comment
Karuzo Posted February 11, 2014 Author Share Posted February 11, 2014 I defined Y above, its not 0. So Y+10 is correct, but idk what you mean with amt and index . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now