Fórum Dix
Bem-vindo ao Fórum Dix. Aqui você poderá encontar conteúdos como:

#Habbo
#Transformice
#Minecraft
#DDTank
#SAMP
#Design
#Web
#Combat Arms
#WEBNODE
#Noticias

Clique em registrar e inicie sua jornada por aqui.
Fórum Dix

Fórum Dix - LEAGUE OF LEGENDS | DDTANK | MINECRAFT | FPS | SUPORTE | DIVERSOS


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir em baixo  Mensagem [Página 1 de 1]

#1
 Wall

avatar
Moderador
Moderador


Olá pessoal trouxe um novo tutorial para nova área então espero que gostem.

Procure por
statsLabel = {}

substitui isso
statsLabel = {}
statsWindows = guiCreateStaticImage(0.775, 0.2, 0.225, 0.22, "images/scrollmenu_1.png", true)
guiSetAlpha(statsWindows, 0.Cool
statsLabel.zombieskilled = guiCreateLabel(0, 0.05, 1, 0.15, "Zombies killed: 0", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.zombieskilled, "center")
guiSetFont(statsLabel.zombieskilled, "default-bold-small")
setElementData(statsLabel.zombieskilled, "identifikation", "zombieskilled")
statsLabel.headshots = guiCreateLabel(0, 0.15, 1, 0.15, "Headshots: 0", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.headshots, "center")
guiSetFont(statsLabel.headshots, "default-bold-small")
setElementData(statsLabel.headshots, "identifikation", "headshots")
statsLabel.murders = guiCreateLabel(0, 0.25, 1, 0.15, "Murders: 0", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.murders, "center")
guiSetFont(statsLabel.murders, "default-bold-small")
setElementData(statsLabel.murders, "identifikation", "murders")
statsLabel.banditskilled = guiCreateLabel(0, 0.35, 1, 0.15, "Bandits killed: 0", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.banditskilled, "center")
guiSetFont(statsLabel.banditskilled, "default-bold-small")
setElementData(statsLabel.banditskilled, "identifikation", "banditskilled")
statsLabel.blood = guiCreateLabel(0, 0.45, 1, 0.15, "Blood: 12000", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.blood, "center")
guiSetFont(statsLabel.blood, "default-bold-small")
setElementData(statsLabel.blood, "identifikation", "blood")
statsLabel.zombies = guiCreateLabel(0, 0.55, 1, 0.15, "Zombies (Alive/Total): 0/0", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.zombies, "center")
guiSetFont(statsLabel.zombies, "default-bold-small")
setElementData(statsLabel.zombies, "identifikation", "zombies")
statsLabel.temperature = guiCreateLabel(0, 0.65, 1, 0.15, "Temperature: 37\194\176C", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.temperature, "center")
guiSetFont(statsLabel.temperature, "default-bold-small")
setElementData(statsLabel.temperature, "identifikation", "temperature")
statsLabel.humanity = guiCreateLabel(0, 0.75, 1, 0.15, "Humanity: 2500", true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.humanity, "center")
guiSetFont(statsLabel.humanity, "default-bold-small")
setElementData(statsLabel.humanity, "identifikation", "humanity")
statsLabel.name = guiCreateLabel(0, 0.85, 1, 0.15, "Name: " .. getPlayerName(getLocalPlayer()), true, statsWindows)
guiLabelSetHorizontalAlign(statsLabel.name, "center")
guiSetFont(statsLabel.name, "default-bold-small")
setElementData(statsLabel.name, "identifikation", "name")
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)
function refreshDebugMonitor()
if getElementData(getLocalPlayer(), "logedin") then
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.zombieskilled, "identifikation"))
guiSetText(statsLabel.zombieskilled, "Zombies killed: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.headshots, "identifikation"))
guiSetText(statsLabel.headshots, "Headshots: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.banditskilled, "identifikation"))
guiSetText(statsLabel.banditskilled, "Bandits killed: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.murders, "identifikation"))
guiSetText(statsLabel.murders, "Murders: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.blood, "identifikation"))
guiSetText(statsLabel.blood, "Blood: " .. value)
local value = getElementData(getRootElement(), "zombiesalive") or 0
local value2 = getElementData(getRootElement(), "zombiestotal") or 0
guiSetText(statsLabel.zombies, "Zombies (Alive/Total): " .. value .. "/" .. value2)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.temperature, "identifikation"))
guiSetText(statsLabel.temperature, "Temperature: " .. math.round(value, 2) .. "\194\176C")
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.humanity, "identifikation"))
guiSetText(statsLabel.humanity, "Humanity: " .. math.round(value, 2))
guiSetText(statsLabel.name, "Name: " .. getPlayerName(getLocalPlayer()))
end
end
setTimer(refreshDebugMonitor, 2000, 0)

por isso
statsLabel = {}
statsWindows = guiCreateStaticImage(0.775,0.15,0.225,0.22, "images/scrollmenu_1.png", true)
guiSetAlpha(statsWindows, 0.80)

statsLabel["debug"] = guiCreateLabel(0.00, 0.04, 1.00, 0.15, "DEBUG MONITOR:", true, statsWindows)
guiSetFont(statsLabel["debug"], "default-bold-small")
guiLabelSetHorizontalAlign(statsLabel["debug"], "center", false)
guiLabelSetVerticalAlign(statsLabel["debug"], "center")
guiLabelSetHorizontalAlign(statsLabel.zombieskilled, "center")

statsLabel.zombieskilled = guiCreateLabel(0.00, 0.25, 1.00, 0.15, "Zombies killed: 0", true, statsWindows)
guiSetFont(statsLabel.zombieskilled, "default-bold-small")
setElementData(statsLabel.zombieskilled, "identifikation", "zombieskilled")
guiLabelSetHorizontalAlign(statsLabel.zombieskilled, "center")

statsLabel.headshots = guiCreateLabel(0.00, 0.33, 1.00, 0.15, "Headshots: 0", true, statsWindows)
guiSetFont(statsLabel.headshots, "default-bold-small")
setElementData(statsLabel.headshots, "identifikation", "headshots")
guiLabelSetHorizontalAlign(statsLabel.headshots, "center")

statsLabel.murders = guiCreateLabel(0.00, 0.41, 1.00, 0.15, "Murders: 0", true, statsWindows)
guiSetFont(statsLabel.murders, "default-bold-small")
setElementData(statsLabel.murders, "identifikation", "murders")
guiLabelSetHorizontalAlign(statsLabel.murders, "center")

statsLabel.banditskilled = guiCreateLabel(0.00, 0.49, 1.00, 0.15, "Bandits killed: 0", true, statsWindows)
guiSetFont(statsLabel.banditskilled, "default-bold-small")
setElementData(statsLabel.banditskilled, "identifikation", "banditskilled")
guiLabelSetHorizontalAlign(statsLabel.banditskilled, "center")

statsLabel.blood = guiCreateLabel(0.00, 0.56, 1.00, 0.15, "Blood: 12000", true, statsWindows)
guiSetFont(statsLabel.blood, "default-bold-small")
setElementData(statsLabel.blood, "identifikation", "blood")
guiLabelSetHorizontalAlign(statsLabel.blood, "center")

statsLabel.zombies = guiCreateLabel(0.00, 0.64, 1.00, 0.15, "Zombies (Alive/Total): 0/0", true, statsWindows)
guiSetFont(statsLabel.zombies, "default-bold-small")
setElementData(statsLabel.zombies, "identifikation", "zombies")
guiLabelSetHorizontalAlign(statsLabel.zombies, "center")

statsLabel.temperature = guiCreateLabel(0.00, 0.71, 1.00, 0.15, "Temperature: 37°C", true, statsWindows)
guiSetFont(statsLabel.temperature, "default-bold-small")
setElementData(statsLabel.temperature, "identifikation", "temperature")
guiLabelSetHorizontalAlign(statsLabel.temperature, "center")

statsLabel.humanity = guiCreateLabel(0.00, 0.79, 1.00, 0.15, "Humanity: 2500", true, statsWindows)
guiSetFont(statsLabel.humanity, "default-bold-small")
setElementData(statsLabel.humanity, "identifikation", "humanity")
guiLabelSetHorizontalAlign(statsLabel.humanity, "center")

statsLabel.name = guiCreateLabel(0.00, 0.88, 1.00, 0.15, "Name: " .. getPlayerName(getLocalPlayer()), true, statsWindows)
guiSetFont(statsLabel.name, "default-bold-small")
setElementData(statsLabel.name, "identifikation", "name")
guiLabelSetHorizontalAlign(statsLabel.name, "center")
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)
function refreshDebugMonitor()
if getElementData(getLocalPlayer(), "logedin") then
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.zombieskilled, "identifikation"))
guiSetText(statsLabel.zombieskilled, "Zombies killed: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.headshots, "identifikation"))
guiSetText(statsLabel.headshots, "Headshots: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.banditskilled, "identifikation"))
guiSetText(statsLabel.banditskilled, "Bandits killed: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.murders, "identifikation"))
guiSetText(statsLabel.murders, "Murders: " .. value)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.blood, "identifikation"))
guiSetText(statsLabel.blood, "Blood: " .. value)
local value = getElementData(getRootElement(), "zombiesalive") or 0
local value2 = getElementData(getRootElement(), "zombiestotal") or 0
guiSetText(statsLabel.zombies, "Zombies (Alive/Total): " .. value .. "/" .. value2)
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.temperature, "identifikation"))
guiSetText(statsLabel.temperature, "Temperature: " .. math.round(value, 2) .. "\194\176C")
local value = getElementData(getLocalPlayer(), getElementData(statsLabel.humanity, "identifikation"))
guiSetText(statsLabel.humanity, "Humanity: " .. math.round(value, 2))
guiSetText(statsLabel.name, "Name: " .. getPlayerName(getLocalPlayer()))
end
end
setTimer(refreshDebugMonitor, 2000, 0)

Créditos: Pedro Cesar (Patati)

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo  Mensagem [Página 1 de 1]


Permissão deste fórum:
Você não pode responder aos tópicos neste fórum

 

 Bem-VindoSeja muito bem-vindo ao nosso fórum de Jogos, por favor efetue seu cadastro para que possuia total acesso ao nosso fórum.