Jump to content

طَلب كود قريد ليست


Recommended Posts

وظيفة تغيير قيَم القريد لست إلى أسماء اللاعبين ..
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then -- Clear GridList 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player '  
                    local Row = guiGridListAddRow ( GridList ) -- Add Row 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values 
                end; -- end of ' for ' 
            end; -- end of ' clear gridlist ' 
        end; -- end of ' check gridlist type ' 
    end; -- end of ' check parematers 
end; -- end of ' function ' 

مثآل :

wnd = guiCreateWindow ( 100, 100, 400, 400, "Test", false ); -- Create Window 
grid = guiCreateGridList ( 25, 30, 350, 350, false, wnd ); -- Create Gridlist 
col = guiGridListAddColumn ( grid, "Players", 0.9 ); -- Create Column 
changeGridListItemToPlayersName ( grid, col ); -- Set Gridlist Values 

Link to comment

    player = {} 
    window = guiCreateWindow(0.31, 0.33, 0.35, 0.45, "players", true) 
    guiWindowSetSizable(window, false) 
    player.list = guiCreateGridList(0.03, 0.07, 0.93, 0.88, true, window) 
    guiGridListAddColumn(player.list, "playres ...", 0.9) 
    ----- 
    Gridlist = player.list -- اسم القريد player.list 
    for _, players in ipairs(getElementsByType("player")) do 
    local row = guiGridListAddRow (Gridlist) 
    guiGridListSetItemText (Gridlist, row, 1, string.gsub(getPlayerName(players), "(#%x%x%x%x%x%x)", " " ),false, false ) 
    end 
      
Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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