Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local max_players = 0
- function math.round(number, decimals, method)
- decimals = decimals or 0
- local factor = 10 ^ decimals
- if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor
- else return tonumber(("%."..decimals.."f"):format(number)) end
- end
- local weaponName = getWeaponNameFromID(weaponID)
- local weaponID = getPedWeapon (getLocalPlayer());
- --dxDrawImage(screenW * 0.3266, screenH * 0.2375, screenW * 0.1961, screenH * 0.1069, "weapons/"..tostring( weaponID ).. ".png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- statsLabel = {}
- statsWindows = guiCreateStaticImage(0.85, 0.18, 0.15, 0.35, "debug_monitor.png", true)
- guiSetAlpha(statsWindows, 0.95)
- weapon = guiCreateStaticImage(0.00, 0.12, 0.98, 0.27,"weapons/"..tostring( weaponID ).. ".png", true, statsWindows)
- zombietext = guiCreateLabel(0.02, 0.55, 0.50, 0.06, "Zombies Killed:", true, statsWindows)
- guiSetFont(zombietext, "default-bold-small")
- guiLabelSetColor(zombietext, 219, 182, 69)
- statsLabel.zombieskilled = guiCreateLabel(0.52, 0.55, 0.46, 0.06, "0", true,statsWindows)
- guiSetFont(statsLabel.zombieskilled, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.zombieskilled, "right", false)
- setElementData(statsLabel.zombieskilled, "identifikation", "zombieskilled")
- mortestext = guiCreateLabel(0.02, 0.61, 0.50, 0.06, "Murders:", true, statsWindows)
- guiSetFont(mortestext , "default-bold-small")
- guiLabelSetColor(mortestext, 219, 182, 69)
- statsLabel.murders = guiCreateLabel(0.52, 0.61, 0.46, 0.06, "0", true, statsWindows)
- guiSetFont(statsLabel.murders, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.murders, "right", false)
- setElementData(statsLabel.murders, "identifikation", "murders")
- banditstext = guiCreateLabel(0.02, 0.67, 0.50, 0.06, "Bandits Killed:", true, statsWindows)
- guiSetFont(banditstext, "default-bold-small")
- guiLabelSetColor(banditstext, 219, 182, 69)
- statsLabel.banditskilled = guiCreateLabel(0.52, 0.67, 0.46, 0.06, "0", true, statsWindows)
- guiSetFont(statsLabel.banditskilled, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.banditskilled, "right", false)
- setElementData(statsLabel.banditskilled, "identifikation", "banditskilled")
- bloodtext = guiCreateLabel(0.02, 0.39, 0.50, 0.06, "Blood:", true, statsWindows)
- guiSetFont(bloodtext, "default-bold-small")
- guiLabelSetColor(bloodtext, 255, 0, 0)
- statsLabel.blood = guiCreateLabel(0.52, 0.39, 0.46, 0.06, "12000", true, statsWindows)
- guiSetFont(statsLabel.blood, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.blood, "right", false)
- setElementData(statsLabel.blood, "identifikation", "blood")
- humanitytext = guiCreateLabel(0.02, 0.45, 0.50, 0.06, "Humanity:", true, statsWindows)
- guiSetFont(humanitytext, "default-bold-small")
- guiLabelSetColor(humanitytext, 26, 12, 158)
- statsLabel.humanity = guiCreateLabel(0.52, 0.45, 0.46, 0.06, "5000", true, statsWindows)
- guiSetFont(statsLabel.humanity, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.humanity, "right", false)
- setElementData(statsLabel.humanity, "identifikation", "humanity")
- alivetimetext = guiCreateLabel(0.02, 0.77, 0.50, 0.06, "Survivor Time:", true, statsWindows)
- guiSetFont(alivetimetext, "default-bold-small")
- guiLabelSetColor(alivetimetext, 219, 182, 69)
- statsLabel.alive = guiCreateLabel(0.52, 0.77, 0.46, 0.06, "0 Min", true, statsWindows)
- guiSetFont(statsLabel.alive, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.alive, "right", false)
- setElementData(statsLabel.alive, "identifikation", "alivetime")
- NamePag = guiCreateLabel(0.00, 0.92, 0.98, 0.06, "fb.com/SERVERNAME", true, statsWindows)
- guiSetFont(NamePag, "default-bold-small")
- guiLabelSetColor(NamePag, 255, 0, 0)
- guiLabelSetHorizontalAlign(NamePag, "center", false)
- guiLabelSetVerticalAlign(NamePag, "center")
- FPSTEXT = guiCreateLabel(0.02, 0.83, 0.50, 0.06, "FPS:", true, statsWindows)
- guiSetFont(FPSTEXT, "default-bold-small")
- guiLabelSetColor(FPSTEXT, 219, 182, 69)
- FPS = guiCreateLabel(0.52, 0.83, 0.46, 0.06, "0", true,statsWindows)
- guiSetFont(FPS, "default-bold-small")
- guiLabelSetHorizontalAlign(FPS, "right", false)
- statsLabel.name = guiCreateLabel(0.00, 0.00, 1.00, 0.06,"["..getPlayerName(getLocalPlayer()).."]", true, statsWindows)
- guiSetFont(statsLabel.name, "default-bold-small")
- guiLabelSetHorizontalAlign(statsLabel.name, "center", false)
- guiLabelSetVerticalAlign(statsLabel.name, "center")
- setElementData(statsLabel.name, "identifikation", "name")
- --[[END]]
- statsLabel["ping"] = guiCreateLabel(0.00, 0.06, 1.00, 0.06,"Ping: 0",true,statsWindows)
- guiLabelSetHorizontalAlign(statsLabel["ping"], "center", false)
- guiLabelSetVerticalAlign(statsLabel["ping"], "center")
- guiSetFont (statsLabel["ping"], "default-bold-small" )
- setElementData(statsLabel["ping"],"identifikation","ping")
- if getElementData(localPlayer, "logedin") then
- guiSetVisible(statsWindows, true)
- else
- guiSetVisible(statsWindows, false)
- end
- function showDebugMonitor()
- local visible = guiGetVisible(statsWindows)
- guiSetVisible(statsWindows, not visible)
- end
- bindKey("F5", "down", showDebugMonitor)
- function showDebugMintorOnLogin()
- guiSetVisible(statsWindows, true)
- end
- addEvent("onClientPlayerDayZLogin", true)
- addEventHandler("onClientPlayerDayZLogin", root, showDebugMintorOnLogin)
- FPSLimit=37
- FPSLimit=255/FPSLimit
- FPSCalc=0
- FPSTime=getTickCount()+1000
- addEventHandler("onClientRender",getRootElement(),function()
- if (getTickCount()<FPSTime) then
- FPSCalc=FPSCalc+1
- else
- if (FPSCalc) then
- FPSLimit=255/FPSCalc
- end
- guiSetText(FPS,FPSCalc)
- FPSCalc=0
- FPSTime=getTickCount()+1000
- end
- end)
- function refreshDebugMonitor()
- if getElementData(getLocalPlayer(), "logedin") then
- local value = getElementData(getLocalPlayer(), getElementData(statsLabel.zombieskilled, "identifikation"))
- guiSetText(statsLabel.zombieskilled,value)
- local value = getElementData(getLocalPlayer(), getElementData(statsLabel.banditskilled, "identifikation"))
- guiSetText(statsLabel.banditskilled,value)
- local value = getElementData(getLocalPlayer(), getElementData(statsLabel.murders, "identifikation"))
- guiSetText(statsLabel.murders,value)
- local value = getElementData(getLocalPlayer(), getElementData(statsLabel.blood, "identifikation"))
- guiSetText(statsLabel.blood,value)
- local value = getElementData(getLocalPlayer(), getElementData(statsLabel.humanity, "identifikation"))
- guiSetText(statsLabel.humanity,math.round(value, 2))
- guiSetText(statsLabel.name, "["..getPlayerName(getLocalPlayer()).."]")
- --guiSetText(playerson, "Players Online: "..getPlayerCount(getLocalPlayer()))
- local value = getElementData(getLocalPlayer(),getElementData(statsLabel.alive,"identifikation"))
- guiSetText(statsLabel.alive,value.." Min")
- guiSetText(statsLabel["ping"],"Ping: "..getPlayerPing(getLocalPlayer()))
- end
- end
- setTimer(refreshDebugMonitor, 2000, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement