Jump to content

Ayuda medallas rango zombies


lpdc99

Recommended Posts

Quisiera que me ayuden con las medallas que yo quiero que se vean las imagenes no el nombre y la direcion donde se encuentra la imagen si me pudieran ayudar por favor... Gracias

-2093847.html'>thump_2093847xd.png

exports.scoreboard:addScoreboardColumn('Rango') 
  
addEventHandler("onPlayerSpawn",root, 
function() 
    local account = getPlayerAccount(source) 
    local zombiekills = getAccountData(account,"Zombie kills") 
if (zombiekills >= 0) and (zombiekills <= 4) then 
setElementData(source,"Rango","ranks/1.png") 
elseif (zombiekills >= 5) and (zombiekills <= 99) then 
setElementData(source,"Rango","ranks/2.png") 
elseif (zombiekills >= 100) and (zombiekills <= 249) then 
setElementData(source,"Rango","ranks/3.png") 
elseif (zombiekills >= 250) and (zombiekills <= 499) then 
setElementData(source,"Rango","ranks/4.png") 
elseif (zombiekills >= 500) and (zombiekills <= 999) then 
setElementData(source,"Rango","ranks/5.png") 
elseif (zombiekills >= 1000) and (zombiekills <= 1499) then 
setElementData(source,"Rango","ranks/6.png") 
elseif (zombiekills >= 1500) and (zombiekills <= 1999) then 
setElementData(source,"Rango","ranks/7.png") 
elseif (zombiekills >= 2000) and (zombiekills <= 2999) then 
setElementData(source,"Rango","ranks/8.png") 
elseif (zombiekills >= 3000) and (zombiekills <= 3999) then 
setElementData(source,"Rango","ranks/9.png") 
elseif (zombiekills >= 4000) and (zombiekills <= 4999) then 
setElementData(source,"Rango","ranks/10.png") 
elseif (zombiekills >= 5000) and (zombiekills <= 5999) then 
setElementData(source,"Rango","ranks/11.png") 
elseif (zombiekills >= 5000) and (zombiekills <= 5999) then 
setElementData(source,"Rango","ranks/12.png") 
elseif (zombiekills >= 6000) and (zombiekills <= 6999) then 
setElementData(source,"Rango","ranks/13.png") 
elseif (zombiekills >= 7000) and (zombiekills <= 7999) then 
setElementData(source,"Rango","ranks/14.png") 
elseif (zombiekills >= 8000) and (zombiekills <= 8999) then 
setElementData(source,"Rango","ranks/15.png") 
elseif (zombiekills >= 9000) and (zombiekills <= 9999) then 
setElementData(source,"Rango","ranks/16.png") 
elseif (zombiekills >= 10000) and (zombiekills <= 11999) then 
setElementData(source,"Rango","ranks/17.png") 
elseif (zombiekills >= 11000) and (zombiekills <= 12999) then 
setElementData(source,"Rango","ranks/18.png") 
elseif (zombiekills >= 12000) and (zombiekills <= 13999) then 
setElementData(source,"Rango","ranks/19.png") 
elseif (zombiekills >= 13000) and (zombiekills <= 14999) then 
setElementData(source,"Rango","ranks/20.png") 
elseif (zombiekills >= 14000) and (zombiekills <= 15999) then 
setElementData(source,"Rango","ranks/21.png") 
elseif (zombiekills >= 15000) and (zombiekills <= 16999) then 
setElementData(source,"Rango","ranks/22.png") 
elseif (zombiekills >= 16000) and (zombiekills <= 17999) then 
setElementData(source,"Rango","ranks/23.png") 
elseif (zombiekills >= 17000) and (zombiekills <= 18999) then 
setElementData(source,"Rango","ranks/24.png") 
elseif (zombiekills >= 18000) and (zombiekills <= 19999) then 
setElementData(source,"Rango","ranks/25.png") 
elseif (zombiekills >= 19000) and (zombiekills <= 21999) then 
setElementData(source,"Rango","ranks/26.png") 
elseif (zombiekills >= 21000) and (zombiekills <= 22999) then 
setElementData(source,"Rango","ranks/27.png") 
elseif (zombiekills >= 22000) and (zombiekills <= 23999) then 
setElementData(source,"Rango","ranks/28.png") 
elseif (zombiekills >= 23000) and (zombiekills <= 24999) then 
setElementData(source,"Rango","ranks/29.png") 
elseif (zombiekills >= 24000) and (zombiekills <= 25999) then 
setElementData(source,"Rango","ranks/30.png") 
elseif (zombiekills >= 25000) and (zombiekills <= 26999) then 
setElementData(source,"Rango","ranks/31.png") 
elseif (zombiekills >= 26000) and (zombiekills <= 27999) then 
setElementData(source,"Rango","ranks/32.png") 
elseif (zombiekills >= 27000) and (zombiekills <= 28999) then 
setElementData(source,"Rango","ranks/33.png") 
elseif (zombiekills >= 28000) and (zombiekills <= 29999) then 
setElementData(source,"Rango","ranks/34.png") 
elseif (zombiekills >= 29000) and (zombiekills <= 31999) then 
setElementData(source,"Rango","ranks/35.png") 
elseif (zombiekills >= 30000) and (zombiekills <= 32999) then 
setElementData(source,"Rango","ranks/36.png") 
elseif (zombiekills >= 31000) and (zombiekills <= 33999) then 
setElementData(source,"Rango","ranks/37.png") 
elseif (zombiekills >= 32000) and (zombiekills <= 34999) then 
setElementData(source,"Rango","ranks/38.png") 
elseif (zombiekills >= 33000) and (zombiekills <= 35999) then 
setElementData(source,"Rango","ranks/39.png") 
elseif (zombiekills >= 34000) and (zombiekills <= 36999) then 
setElementData(source,"Rango","ranks/40.png") 
elseif (zombiekills >= 35000) and (zombiekills <= 37999) then 
setElementData(source,"Rango","ranks/41.png") 
elseif (zombiekills >= 36000) and (zombiekills <= 38999) then 
setElementData(source,"Rango","ranks/42.png") 
elseif (zombiekills >= 37000) and (zombiekills <= 39999) then 
setElementData(source,"Rango","ranks/43.png") 
elseif (zombiekills >= 38000) and (zombiekills <= 41999) then 
setElementData(source,"Rango","ranks/44.png") 
elseif (zombiekills >= 39000) and (zombiekills <= 42999) then 
setElementData(source,"Rango","ranks/45.png") 
elseif (zombiekills >= 40000) and (zombiekills <= 43999) then 
setElementData(source,"Rango","ranks/46.png") 
elseif (zombiekills >= 41000) and (zombiekills <= 44999) then 
setElementData(source,"Rango","ranks/47.png") 
elseif (zombiekills >= 42000) and (zombiekills <= 45999) then 
setElementData(source,"Rango","ranks/48.png") 
elseif (zombiekills >= 43000) and (zombiekills <= 46999) then 
setElementData(source,"Rango","ranks/49.png") 
elseif (zombiekills >= 44000) and (zombiekills <= 47999) then 
setElementData(source,"Rango","ranks/50.png") 
end 
end 
) 
  
addEventHandler("onPlayerSpawn",root, 
function () 
    local cuenta = getPlayerAccount(source) 
    if isGuestAccount(cuenta) then return end 
    local rango = getAccountData(cuenta,"Rango") 
    if rango then 
        setElementData(source,"Rango", rango) 
end 
end 
) 

Link to comment

Extrañamente ami tampoco me funciono eso, independiente de que tenia mi scoreboard editado.

Intenta crear sistema por nivel y ponerle numero a las imagenes por cada nivel

y usar algo como esto

level = getElementData(source,"Level") 
if level then 
setElementData(source,"Rango",":Script/Imagenes/"..level..".png")-- deberas alojar las imnagenes en otro script 
end 
end 
  

Nose si me doy a entender

Link to comment

mira estoy encontre en scoreboard a mi me lo dieron terminado al scoreboard pero creo que tengo que cambiar nombres y algunos datos para que funcione la medalla asi es como tengo de los flags :D

elseif column.name == "country" then     
                                local countryImage = ':admin/client/images/flags/'..string.lower(content)..'.png' 
                                if fileExists(countryImage) then 
                                    dxDrawImage(topX+theX,y+((1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ))/2)-(11/2),16,11,countryImage) 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+20+theX+s(1)+s(10),   y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                    dxDrawText(  "#FFFFFF"..content, topX+20+theX+s(10),        y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                                else 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+theX+s(1),    y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                    dxDrawText(  "#FFFFFF"..content, topX+theX,         y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                                end 
                            elseif column.name == "id" then 
                                if element == localPlayer then 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+s(1),     y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI ) 
                                    dxDrawText( "#ff7900"..content, topX,       y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI,true ) 
                                else 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+s(1),     y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI ) 
                                    dxDrawText( "#FFFFFF"..content, topX,       y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI,true ) 
                                end 
                            else 
                                dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+theX+s(1),    y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                dxDrawText(  ""..content, topX+theX,        y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                            end 
                        end 
                        x = x + s(column.width + 10) 
                    end 
                end 
                local font = iif( element and isElement( element ) and getElementType( element ) == "team", teamHeaderFont, contentFont ) 
                index = index + 1 
                if getElementType( element ) == "team" then 
                    y = y + dxGetFontHeight( fontscale(font, scoreboardScale), font ) 
                else 
                    y = y + 1.5*dxGetFontHeight( fontscale(font, scoreboardScale), font ) 
                end 
            end 
            index = 1 
        end 
    end 
end 

Link to comment
  • MTA Team
elseif column.name == "country" then    
                                local countryImage = ':admin/client/images/flags/'..string.lower(content)..'.png' 
                                if fileExists(countryImage) then 
                                    dxDrawImage(topX+theX,y+((1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ))/2)-(11/2),16,11,countryImage) 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+20+theX+s(1)+s(10),   y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                    dxDrawText(  "#FFFFFF"..content, topX+20+theX+s(10),        y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                                else 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+theX+s(1),    y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                    dxDrawText(  "#FFFFFF"..content, topX+theX,         y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                                end 
elseif column.name == "Rango" then 
                                column.width = 50 
                                dxDrawImage( topX+theX, y-s(2), 20, 20, content, 0, 0, 0, cWhite, drawOverGUI ) 
                            elseif column.name == "id" then 
                                if element == localPlayer then 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+s(1),     y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI ) 
                                    dxDrawText( "#ff7900"..content, topX,       y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI,true ) 
                                else 
                                    dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+s(1),     y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI ) 
                                    dxDrawText( "#FFFFFF"..content, topX,       y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "center", "center", true, false, drawOverGUI,true ) 
                                end 
                            else 
                                dxDrawText( string.gsub(content,"#%x%x%x%x%x%x",""), topX+theX+s(1),    y+s(1), topX+x+s(1+column.width),   y+s(1)+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),   tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI ) 
                                dxDrawText(  ""..content, topX+theX,        y,      topX+x+s(column.width),     y+(1.5*dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )),            tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "center", true, false, drawOverGUI,true ) 
                            end 
                        end 
                        x = x + s(column.width + 10) 
                    end 
                end 
                local font = iif( element and isElement( element ) and getElementType( element ) == "team", teamHeaderFont, contentFont ) 
                index = index + 1 
                if getElementType( element ) == "team" then 
                    y = y + dxGetFontHeight( fontscale(font, scoreboardScale), font ) 
                else 
                    y = y + 1.5*dxGetFontHeight( fontscale(font, scoreboardScale), font ) 
                end 
            end 
            index = 1 
        end 
    end 
end 

Link to comment
  • Recently Browsing   0 members

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