M7MD# Posted June 9, 2015 Share Posted June 9, 2015 السلام عليكم بغيت مساعدة كيف اضيف قريد ليست فيه جميع لاعبين السيرفر الى لوحة معينة والسلام عليكم Link to comment
Simple. Posted June 9, 2015 Share Posted June 9, 2015 وظيفة تغيير قيَم القريد لست إلى أسماء اللاعبين .. 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
#|_oskar_|# Posted June 9, 2015 Share Posted June 9, 2015 (edited) 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 June 9, 2015 by Guest Link to comment
#|_oskar_|# Posted June 9, 2015 Share Posted June 9, 2015 ^ سطر 9 نآقص قوس . تم التعديل مشكور ع التنبيه Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now