Jump to content

Vic_RattleHead!

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vic_RattleHead!'s Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Ya logre hacerlo, ahora la cuestión es que al pasar el cursor por un item, se marca el item contrario, y como logro que solo se vean de a 10 items por lista, y al oprimir siguiente pase a los demas items ?. gracias. Swidht, Sheight = guiGetScreenSize() px, py = ( Swidht/1366 ), ( Sheight/768 ) addEventHandler("onClientRender", root, function() dxDrawRectangle(252*px, 240*py, 176*px, 31*py, tocolor(42, 42, 42, 180), false) dxDrawRectangle(252*px, 271*py, 176*px, 251*py, tocolor(0, 0, 0, 180), false) dxDrawText("JUGADORES", 252*px, 240*py, 428*px, 271*py, tocolor(255, 255, 255, 255), 1.00*px, "default", "center", "center", false, false, false, false, false) for INDEX, ITEMS in ipairs( getElementsByType( "player" ) ) do ROW = INDEX INDEX = INDEX + 1 POS_Y = py*( 30*ROW ) dxDrawRectangle(252*px, ( 250*py )+POS_Y, 176*px, 30*py, COLOR_ROW, false) dxDrawText( getPlayerName( ITEMS ), 252*px, ( 250*py )+POS_Y, 428*px, ( 280*py )+POS_Y, tocolor(255, 255, 255, 255), 1.00*px, "default", "center", "center", false, false, false, false, false) if isCursorShowing() then CX, CY,_,_,_ = getCursorPosition() if CX >= 252/1366 and CX <= 252/1366 + 176/1366 and CY >= ( 250 + POS_Y )/768 and CY <= ( 250 + POS_Y )/768 + 30/768 then COLOR_ROW = tocolor( 255, 255, 255, 20 ) else COLOR_ROW = tocolor( 255, 255, 255, 0 ) end end end end )
  2. Logre hacerlo, el primer row esta perfectamente centrado con su rectangulo, pero el segundo row esta mucho mas abajo del primero y su rectangulo esta aun mas abajo, como lo organizo para que se cree correctamente debajo del row anterior ? addEventHandler("onClientRender", root, function() dxDrawRectangle(252, 240, 176, 31, tocolor(42, 42, 42, 180), false) dxDrawRectangle(252, 271, 176, 251, tocolor(0, 0, 0, 180), false) dxDrawText("JUGADORES", 252, 240, 428, 271, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) for i, row in ipairs( getElementsByType( "player" ) ) do dxDrawRectangle(252, 281*i, 176, 31, tocolor(42, 42, 42, 180), false) dxDrawText( getPlayerName( row ), 252, 281*i, 428, 312, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) end end )
  3. Hola, estoy tratando de crear una 'dxList' en donde automáticamente se agreguen 'ROWS', usualmente usaba Dx combinado con GUI pero me dieron ganas de crear una especie de gridListDx sin usar DGS, por el momento solo he agregado jugadores a un solo row, como logro que se detecte que ya existe un jugador en esa row y se cree otra un poco mas abajo ? Y = 336 function DX() dxDrawRectangle(561, 326, 223, 320, tocolor(0, 0, 0, 180), false) dxDrawRectangle(561, 336, 223, 30, tocolor(42, 42, 42, 180), false) dxDrawRectangle(561, 296, 223, 30, tocolor(42, 42, 42, 180), false) for k, v in ipairs( getElementsByType( "player" ) ) do JUGADOR = getPlayerName( v ) if getPlayerName( v ) == JUGADOR then dxDrawText( JUGADOR, 561, Y, 784, 365, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) else end end end addEventHandler( "onClientRender", root, DX )
×
×
  • Create New...