فاّرس Posted May 12, 2013 Share Posted May 12, 2013 شرحنا بما فيه الكفايه, جرب الكود وشوفه وانت بتفهم بإذن الله, Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 شوف الحين انا سويت قريد ليست وابي يجي فيه كل الاعبين الموجودين في السيرفر GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.5) بحااول فيه Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 سويت كذا وماضبط :\ GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 طريقة افضل : addEventHandler("onClientRender",getRootElement(), function ( ) if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- نتحقق النافذهـ مفتوحة guiGridListClear( GUIEditor_Grid[1] ) -- نسوي كلير عشان التكرار مايصير for _,player in ipairs ( getElementsByType("player") ) do -- نجيب كل الاعبين local row = guiGridListAddRow(GUIEditor_Grid[1]) -- نسوي رو guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) -- نحط الاسم بالقريد end end end ) Link to comment
PaiN^ Posted May 12, 2013 Share Posted May 12, 2013 ما تنفع طريقتك برستيج. ما راح يقدر يختار من القريد لأنه كل شوي ينمسح لآزم يسوي تحديث مع الأحداث التالية : onClientPlayerJoin onClientPlayerQuit onClientPlayerChangeNick Link to comment
فاّرس Posted May 12, 2013 Share Posted May 12, 2013 GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) function List() if ( guiGetVisible(GUIEditor_Window[1]) == true ) then guiGridListSetSelectionMode(GUIEditor_Grid[1], 2) local Column = guiGridListAddColumn(GUIEditor_Grid[1], "Players List...", 0.85); for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor_Grid[1]) NamePlayer = guiGridListSetItemText(GUIEditor_Grid[1], row, Column, getPlayerName(player), false, false) setTimer(List,10000,0) end end end Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 حلوو شرح جميل ولاكن لما اضغط علي النك مايجي عليه تحديد !!! ومعليش اعذرني جديد علي القريد ليست ممكن توضحلي هنا شوي guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) وش ذا رقم 1 الي قدام كلمة راو وليه بل اخير حطيت false, false ?? و هذا وش فايدته row = guiGridListAddRow(GUIEditor_Grid[1]) Link to comment
فاّرس Posted May 12, 2013 Share Posted May 12, 2013 اذا قصدك تبيها في اديت , جرب, addEventHandler("onClientGUIClick",Grid, function() local Get = guiGridListGetItemText(Grid, guiGridListGetSelectedItem(Grid), 1) guiSetText(EditName, Get) end) ^ ما جربته ذذ Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 وش دخل الايديت ؟ انا قلت بعد ماسويت القريد ليست وطلعو اسماء الاعبين ابي احدد اسم الاعب بـ القريد الي سويته بس لما اضغط عليه مايجي علي الاسم خط ازرق زي الادمنيه ليه ؟ Link to comment
PaiN^ Posted May 12, 2013 Share Posted May 12, 2013 ما تنفع طريقتك برستيج. ما راح يقدر يختار من القريد لأنه كل شوي ينمسحلآزم يسوي تحديث مع الأحداث التالية : onClientPlayerJoin onClientPlayerQuit onClientPlayerChangeNick Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 انا قلت تحديد الازرق ذا ماقلت عند دخول الاعب و عند الخروج وعند تغيير الاسم Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 سويت كذا وماضبط :\ GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; ============================== GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) changeGridListItemToPlayersName(GUIEditor_Grid[1],1) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; لازم تسوية يتحدث مثلا يوم يدخل ولا يوم تسوي بايند كي الخ # Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 الحين انا هذا كودي GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) addEventHandler("onClientRender",getRootElement(), function ( ) if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- نتحقق النافذهـ مفتوحة guiGridListClear( GUIEditor_Grid[1] ) -- نسوي كلير عشان التكرار مايصير for _,player in ipairs ( getElementsByType("player") ) do -- نجيب كل الاعبين local row = guiGridListAddRow(GUIEditor_Grid[1]) -- نسوي رو guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) -- نحط الاسم بالقريد end end end ) يشتغل بس مايمديني احدد اسم الاعب Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 لا تستخدمة مثل ماقالكـ بين نسيت انة يحدث بسرعه يتغير مايمديكـ # استخدم اللي في ردي السابق و سوي لة تحديث يوم يفتح النافذهـ وبس ذذ Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 سويت كذا وخرب ماعاد يجيب اسماء الاعبين GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; Link to comment
فاّرس Posted May 12, 2013 Share Posted May 12, 2013 GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) function List() if ( guiGetVisible(GUIEditor_Window[1]) == true ) then guiGridListSetSelectionMode(GUIEditor_Grid[1], 2) local Column = guiGridListAddColumn(GUIEditor_Grid[1], "Players List...", 0.85); for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor_Grid[1]) NamePlayer = guiGridListSetItemText(GUIEditor_Grid[1], row, Column, getPlayerName(player), false, false) setTimer(List,10000,0) end end end ولا طقيت له خبر Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 سويت كذا وماضبط :\ GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; ============================== GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible ( GUIEditor_Window[1], false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) changeGridListItemToPlayersName(GUIEditor_Grid[1],1) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); end; end; end; end; end; لازم تسوية يتحدث مثلا يوم يدخل ولا يوم تسوي بايند كي الخ # Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 سويت نفس الي تحت وخرب الكود وسويت نفس الي فوق وهم خرب الكود Link to comment
3ssol Posted May 12, 2013 Author Share Posted May 12, 2013 WARNING : Script "Grid-List\client.lua' is not encodeed as ANSI... Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 حول كود المود لـ UTF-8 GUIEditor_Window = {} GUIEditor_Grid = {} 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 for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); end; end; end; end; end; GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) guiSetVisible( GUIEditor_Window[1],true ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"player ",0.9) changeGridListItemToPlayersName(GUIEditor_Grid[1],1) Link to comment
iPrestege Posted May 12, 2013 Share Posted May 12, 2013 انسخ الكود اللي بردي السابق عدلتة اللي قبل هذا # 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