ItsJustRonalds Posted May 31, 2015 Share Posted May 31, 2015 So i have a question where can i find and edit mta dayz scorebord? In the [DayZ-MTA] Folder??? Link to comment
SpoC^ Posted May 31, 2015 Share Posted May 31, 2015 Go [DayZ-MTA] > DayZ > survivorSystem_client.lua Look for function scoreBoard Full function that will probably be on your survivorSystem_client.lua function scoreBoard() if getKeyState("tab") == false then return end if getElementData(getLocalPlayer(), "logedin") then local offset = dxGetFontHeight(1.55, "default-bold") dxDrawImage(screenWidth * 0.15, screenHeight * 0.2, screenWidth * 0.7, screenHeight * 0.2 + yA, "images/window_bg.png", 0, 0, 0, tocolor(255, 255, 255)) dxDrawRectangle(screenWidth * 0.15, screenHeight * 0.2 + offset * 2, screenWidth * 0.7, screenHeight * 0.0025, tocolor(255, 255, 255, 220)) dxDrawText("Name", screenWidth * 0.175, screenHeight * 0.2 + offset, screenWidth * 0.175, screenHeight * 0.2 + offset, tocolor(50, 255, 50, 200), 1.5, "default-bold") w1 = dxGetTextWidth("Name", 1.5, "default-bold") dxDrawText("Murders", screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset, screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset, tocolor(50, 255, 50, 200), 1.5, "default-bold") w2 = dxGetTextWidth("Murders", 1.5, "default-bold") dxDrawRectangle(screenWidth * 0.3 + w1 * 1.6 - w2 * 0.1 - screenWidth * 0.0025 / 2, screenHeight * 0.2, screenWidth * 0.0025, screenHeight * 0.2 + yA, tocolor(255, 255, 255, 220)) dxDrawRectangle(screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 - screenWidth * 0.0025 / 2, screenHeight * 0.2, screenWidth * 0.0025, screenHeight * 0.2 + yA, tocolor(255, 255, 255, 220)) dxDrawText("Zombies Killed", screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 - screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset, screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset, tocolor(50, 255, 50, 200), 1.5, "default-bold") w3 = dxGetTextWidth("Zombies Killed", 1.5, "default-bold") dxDrawRectangle(screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2, screenHeight * 0.2, screenWidth * 0.0025, screenHeight * 0.2 + yA, tocolor(255, 255, 255, 220)) dxDrawText("Alive Time", screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset, screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset, tocolor(50, 255, 50, 200), 1.5, "default-bold") w4 = dxGetTextWidth("Alive Time", 1.5, "default-bold") dxDrawRectangle(screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2 + w2 * 0.1 + w4 + w2 * 0.1, screenHeight * 0.2, screenWidth * 0.0025, screenHeight * 0.2 + yA, tocolor(255, 255, 255, 220)) dxDrawText("Players:" .. #getElementsByType("player"), screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2 + w2 * 0.1 + w4 + w2 * 0.1 + w4 / 3, screenHeight * 0.2 + offset, screenWidth * 0.8, screenHeight * 0.2 + offset, tocolor(50, 255, 50, 200), 1.5, "default-bold") playerInList = false local playerAmount = #getElementsByType("player") if playerAmount > 10 then playerAmount = 10 end for i = 1, playerAmount do yA = i * offset local offset2 = dxGetFontHeight(1.5, "default-bold") local player = getRankingPlayer(i) or false if not player then break end r, g, b = 255, 255, 255 if getPlayerName(player) == getPlayerName(getLocalPlayer()) then r, g, b = 50, 255, 50 playerInList = true end dxDrawText(i, screenWidth * 0.155, screenHeight * 0.2 + offset * 2 + yA, screenWidth * 0.175, screenHeight * 0.2 + offset + yA, tocolor(r, g, b, 200), 1.5, "default-bold") dxDrawText(string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", ""), screenWidth * 0.175, screenHeight * 0.2 + offset * 2 + yA, screenWidth * 0.175, screenHeight * 0.2 + offset + yA, tocolor(r, g, b, 200), 1.5, "default-bold") local murders = getElementData(player, "murders") dxDrawText(murders, screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset * 2 + yA, screenHeight * 0.2 + offset * 2 + yA, screenHeight * 0.2 + offset + yA, tocolor(r, g, b, 200), 1.5, "default-bold") local zombieskilled = getElementData(player, "zombieskilled") dxDrawText(zombieskilled, screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 - screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset * 2 + yA, screenWidth * 0.175, screenHeight * 0.2 + offset + yA, tocolor(r, g, b, 200), 1.5, "default-bold") local alivetime = getElementData(player, "alivetime") or 0 dxDrawText(formatTimeFromMinutes(alivetime), screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset * 2 + yA, screenWidth * 0.175, screenHeight * 0.2 + offset + yA, tocolor(r, g, b, 200), 1.5, "default-bold") end playerLocalAdd = 0 if not playerInList then playerLocalAdd = offset r, g, b = 50, 255, 50 dxDrawRectangle(screenWidth * 0.15, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset - offset / 2, screenWidth * 0.7, screenHeight * 0.0025, tocolor(255, 255, 255, 220)) local rank = getElementDataPosition("alivetime", getElementData(getLocalPlayer(), "alivetime")) dxDrawText(rank, screenWidth * 0.155, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, screenWidth * 0.175, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, tocolor(r, g, b, 200), 1.5, "default-bold") dxDrawText(string.gsub(getPlayerName(getLocalPlayer()), "#%x%x%x%x%x%x", ""), screenWidth * 0.175, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, screenWidth * 0.175, screenHeight * 0.2 + offset + (playerAmount + 2) * offset, tocolor(r, g, b, 200), 1.5, "default-bold") local murders = getElementData(getLocalPlayer(), "murders") dxDrawText(murders, screenWidth * 0.3 + w1 * 1.6, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, screenWidth * 0.175, screenHeight * 0.2 + offset + (playerAmount + 2) * offset, tocolor(r, g, b, 200), 1.5, "default-bold") local zombieskilled = getElementData(getLocalPlayer(), "zombieskilled") dxDrawText(zombieskilled, screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 - screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, screenWidth * 0.175, screenHeight * 0.2 + offset + (playerAmount + 2) * offset, tocolor(r, g, b, 200), 1.5, "default-bold") local alivetime = getElementData(getLocalPlayer(), "alivetime") or 0 dxDrawText(formatTimeFromMinutes(alivetime), screenWidth * 0.3 + w1 * 1.6 + w2 * 1.1 + w3 + w2 * 0.1 + screenWidth * 0.0025 / 2 + w2 * 0.1, screenHeight * 0.2 + offset * 2 + (playerAmount + 2) * offset, screenWidth * 0.175, screenHeight * 0.2 + offset + (playerAmount + 2) * offset, tocolor(r, g, b, 200), 1.5, "default-bold") end yA = playerAmount * offset + playerLocalAdd end end addEventHandler("onClientRender", getRootElement(), scoreBoard) 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