Arsilex Posted September 21, 2012 Share Posted September 21, 2012 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 ? Link to comment
Castillo Posted September 21, 2012 Share Posted September 21, 2012 guiGridListSetItemColor ( Tabla, row, column, getPlayerNametagColor ( player ) ) Link to comment
Arsilex Posted September 21, 2012 Author Share Posted September 21, 2012 pero solo me pone el color del team no del player Link to comment
Castillo Posted September 21, 2012 Share Posted September 21, 2012 La funcion: getPlayerNametagColor obtiene el color del nick, pero no los colores HEX tipo: #FF0000 Link to comment
Arsilex Posted September 21, 2012 Author Share Posted September 21, 2012 y como se hace para obtener colores HEX ? Link to comment
Arsilex Posted September 21, 2012 Author Share Posted September 21, 2012 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 Link to comment
Recommended Posts