I_Mr.[T]he[P]rInCe Posted April 16, 2015 Share Posted April 16, 2015 السلام عليكم كيف اسوي لوحة فيها اسماء الللعبين المتواجدين في السيرفر وشكرا Link to comment
yazan Posted April 16, 2015 Share Posted April 16, 2015 أعمل قرييد ليست اعمل لوب للاعبين الموجدين Link to comment
I_Mr.[T]he[P]rInCe Posted April 16, 2015 Author Share Posted April 16, 2015 أعمل قرييد ليستاعمل لوب للاعبين الموجدين ممكن مثال Link to comment
yazan Posted April 16, 2015 Share Posted April 16, 2015 local List = اسم القريد ليست addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) nike Link to comment
I_Mr.[T]he[P]rInCe Posted April 16, 2015 Author Share Posted April 16, 2015 local List = اسم القريد ليست addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) nike شكرا Link to comment
yazan Posted April 16, 2015 Share Posted April 16, 2015 local List = اسم القريد ليست addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) nike شكرا العفو Link to comment
I_Mr.[T]he[P]rInCe Posted May 7, 2015 Author Share Posted May 7, 2015 local List = اسم القريد ليست addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) nike شكرا العفو اخي جربتها ما اشتغلت Link to comment
terreus Posted May 7, 2015 Share Posted May 7, 2015 تفضل function list() guiGridListClear(playe) for id, players in ipairs (getElementsByType("player")) do local row = guiGridListAddRow(playe) guiGridListSetItemText(playe, row, 1, getPlayerName(players), false, false) guiGridListSetItemColor ( playe, row, 1, 0, 250, 154, 255 ) end end addEventHandler("onClientResourceStart", resourceRoot, list) addEventHandler("onClientPlayerJoin", getRootElement(), list) addEventHandler("onClientPlayerQuit", getRootElement(), list) addEventHandler("onClientPlayerChangeNick", getRootElement(), list) Link to comment
' A F . Posted May 8, 2015 Share Posted May 8, 2015 كود يزن صحيح لاكن الغلط منك اطرح Client كامل و الميتا Link to comment
</Mr.Tn6eL> Posted May 8, 2015 Share Posted May 8, 2015 كود يزن خاطئ وتم وضع طلب مثل هذا من قبل You can use this and be sure to replace gridList and column with your. function updateList(old, new) if eventName == "onClientPlayerJoin" then local row = guiGridListAddRow(gridList) guiGridListSetItemText(gridList, row, column, getPlayerName(source), false, false) elseif eventName == "onClientPlayerQuit" then for i=0, guiGridListGetRowCount(gridList) do if guiGridListGetItemText(gridList, i, column) == getPlayerName(source) then guiGridListRemoveRow(gridList, i) end end elseif eventName == "onClientPlayerChangeNick" then for i=0, guiGridListGetRowCount(gridList) do if guiGridListGetItemText(gridList, i, column) == old then guiGridListSetItemText(gridList, i, column, new, false, false) end end end end addEventHandler("onClientPlayerJoin", root, updateList) addEventHandler("onClientPlayerQuit", root, updateList) addEventHandler("onClientPlayerChangeNick", root, updateList) Link to comment
yazan Posted May 8, 2015 Share Posted May 8, 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 end end end Link to comment
I_Mr.[T]he[P]rInCe Posted May 8, 2015 Author Share Posted May 8, 2015 شكرا علي جميع المساعدات Link to comment
Mr.R Posted May 8, 2015 Share Posted May 8, 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
terreus Posted May 8, 2015 Share Posted May 8, 2015 شكرا علي جميع المساعدات العفو بس افضل دورة شوي في قسم راح تلقي كود 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