Jump to content

Hola :p


Sticmy

Recommended Posts

Posted
Lo que quieres es que al precionar un botón o algo pase al jugador a otra gridlist? ya intentaste usando guiGridListAddRow :idea:

No man quiero que al precionar el boton seleccione al jugador del gridlist, pase a otro gridlist..

Posted
Lo que quieres es que al precionar un botón o algo pase al jugador a otra gridlist? ya intentaste usando guiGridListAddRow :idea:

No man quiero que al precionar el boton seleccione al jugador del gridlist, pase a otro gridlist..

Tienes que utilizar esa función, además de guiGridListGetItemText.

Me podrías explicar un poco Tomas? no la entiendo :c

Posted
Me podrías explicar un poco Tomas? no la entiendo :c
addEventHandler("onClientGUIClick", gridlist,  
    function() 
        local row, column = guiGridListGetSelectedItem(source) 
        if ( row ~= -1, and column ~= -1 ) then 
            local pname = guiGridListGetItemText(source, row, column) 
            local _row = guiGridListAddRow(anothergridlist) 
            guiGridListSetItemText(anothergridlist, _row, 1, pname) 
        end 
    end, false 
) 

Posted
Me podrías explicar un poco Tomas? no la entiendo :c
addEventHandler("onClientGUIClick", gridlist,  
    function() 
        local row, column = guiGridListGetSelectedItem(source) 
        if ( row ~= -1, and column ~= -1 ) then 
            local pname = guiGridListGetItemText(source, row, column) 
            local _row = guiGridListAddRow(anothergridlist) 
            guiGridListSetItemText(anothergridlist, _row, 1, pname) 
        end 
    end, false 
) 

addEventHandler("onClientGUIClick", root, 
function() 
    if source == cancel_button then 
        guiSetVisible(panel_admins, false) 
        showCursor(false) 
    -- añadir jugadores 
    elseif source == add_button then 
        local playerName = guiGridListGetItemText ( jugadores_cercanos, guiGridListGetSelectedItem ( jugadores_cercanos ), 1 ) 
        guiGridListRemoveRow ( jugadores_cercanos, playerName ) 
        guiGridListSetItemText(jugadores_cercanos,guiGridListInsertRowAfter(jugadores_invitados,guiGridListGetRowCount(jugadores_invitados)),1,getPlayerName(localPlayer),false,false) 
    end 
end 
) 

Lo hice con la función guiGridListInsertRowAfter pero no funciona que podría ser? Tú código me da error :c

  • Recently Browsing   0 members

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