Arsilex Posted January 9, 2013 Share Posted January 9, 2013 bueno tengo esto Teams = guiCreateGridList(1044, 298, 314, 409, false) local NTeam = guiGridListAddColumn( Teams, "No Team", 0.4 ) local XNN = guiGridListAddColumn( Teams, "XN", 0.3 ) local Admins = guiGridListAddColumn( Teams, "Admins", 0.3 ) addEventHandler ( "onClientGUIClick", Teams, click ) function click ( button, state, sx, sy, x, y, z, elem, gui ) local playerName = guiGridListGetItemText ( Teams, guiGridListGetSelectedItem ( Teams ), 1 ) outputChatBox ( playerName ) end me gustaria saber si es posible que la columna de abajo osea el 1 si se puede sacar de alguna manera es que cuando presiona en un texto de la columna 3 me sale el texto de la 1 Link to comment
Castillo Posted January 9, 2013 Share Posted January 9, 2013 No entiendo de que hablas. Link to comment
Arsilex Posted January 9, 2013 Author Share Posted January 9, 2013 tengo 1 girld con 3 columnas y quiero que al presionar en el row de una columna me salga en el chat ._. Link to comment
Castillo Posted January 9, 2013 Share Posted January 9, 2013 Teams = guiCreateGridList(1044, 298, 314, 409, false) local NTeam = guiGridListAddColumn( Teams, "No Team", 0.4 ) local XNN = guiGridListAddColumn( Teams, "XN", 0.3 ) local Admins = guiGridListAddColumn( Teams, "Admins", 0.3 ) function click ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playerName = guiGridListGetItemText ( source, row, 1 ) outputChatBox ( playerName ) end end addEventHandler ( "onClientGUIClick", Teams, click, false ) Link to comment
Arsilex Posted January 9, 2013 Author Share Posted January 9, 2013 Teams = guiCreateGridList(1044, 298, 314, 409, false) local NTeam = guiGridListAddColumn( Teams, "No Team", 0.4 ) local XNN = guiGridListAddColumn( Teams, "XN", 0.3 ) local Admins = guiGridListAddColumn( Teams, "Admins", 0.3 ) function click ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playerName = guiGridListGetItemText ( source, row, 1 ) outputChatBox ( playerName ) end end addEventHandler ( "onClientGUIClick", Teams, click, false ) ok thx castillo Link to comment
Recommended Posts