Jump to content

Ayuda con guiGridListSetItemText


Arsilex

Recommended Posts

Posted

Como ago para que esto

function stats2 () 
  
    Tabla = guiCreateGridList(639,99,356,511,false) 
    guiSetAlpha(Tabla,0.69999998807907) 
    local column = guiGridListAddColumn( Tabla, "Players", 0.85 ) 
    if ( column ) then 
        for id, player in ipairs(getElementsByType("player")) do 
            local row = guiGridListAddRow ( Tabla ) 
            guiGridListSetItemText ( Tabla, row, column, getPlayerName ( player ), false, false ) 
        end 
    end 
  
end 

El nombre salga en color :S?

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
guiGridListSetItemColor ( Tabla, row, column, getPlayerNametagColor ( player ) ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

La funcion: getPlayerNametagColor obtiene el color del nick, pero no los colores HEX tipo: #FF0000

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function RGBToHex(red, green, blue, alpha) 
    if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then 
        return nil 
    end 
    if(alpha) then 
        return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) 
    else 
        return string.format("#%.2X%.2X%.2X", red,green,blue) 
    end 
end 

_getPlayerName(player) 

Y no me funciona

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
  • Recently Browsing   0 members

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