Professional Posted July 13, 2015 Share Posted July 13, 2015 السلام عليكم سؤال كيف اربط القريد ليست بل كود مثال لاعب احدده احط بنصف التيكست او ذا المستطيل النصي رقم واحط انه يعطيه فلوس بس انا طلبي الاساسي كيف اربط القريد ليست بل كود Link to comment
' A F . Posted July 13, 2015 Share Posted July 13, 2015 guiSetText guiGridListGetSelectedItem guiGridListGetItemText ^ تفضل ي مبرمجنا . Link to comment
#Wizard Posted July 13, 2015 Share Posted July 13, 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
TAPL Posted July 13, 2015 Share Posted July 13, 2015 ^ ما له علاقة، ما طلب كيف يحط اسماء اللاعبين بالقريد لست Link to comment
#Wizard Posted July 13, 2015 Share Posted July 13, 2015 بسمـ الله الرحمن الرحيمـ وظيفة guiGridListGetSelectedItemText الحصول على نص الغرض المختار من أي جريد لست string guiGridListGetSelectedItemText ( element gridList [, int column ] ) يعني نص وهو نص الغرض المختار في لوحة القريد لست المحددة string الوظيفة ترجع لك false أما إذا كان نص الغرض المحدد فاضي فترجعلك الكود function guiGridListGetSelectedItemText ( gridList, column ) local item = guiGridListGetSelectedItem ( gridList ) local text = guiGridListGetItemText ( gridList, item, column or 1 ) if ( text ~= '' ) then return text else return false end end column مثال بدون إستخدام الـ wnd = guiCreateWindow ( X, Y, Width, Height, 'Example', false, false ) -- لعمل نافذة gridList = guiCreateGridList ( X, Y, Width, Height, false, wnd ) -- لعمل قريد في النافذة guiGridListGetSelectedItemText ( GridList ) -- للحصول على نص الغرض المختار column مثال بإستخدام الـ wnd = guiCreateWindow ( X, Y, Width, Height, 'Example', false, false ) -- لعمل نافذة gridList = guiCreateGridList ( X, Y, Width, Height, false, wnd ) -- لعمل قريد في النافذة column = guiGridListAddColumn ( gridList, 'Example', 0.8 ) -- في القريد column لعمل guiGridListGetSelectedItemText ( gridList, column ) -- للحصول على نص الغرض المختار ** column = عمود Link to comment
terreus Posted July 13, 2015 Share Posted July 13, 2015 -- Client 'onClientGUIClick' guiGridListGetItemText getElementsByType guiGridListSetSelectionMode -- Server getPlayerMoney getPlayerFromName givePlayerMoney takePlayerMoney Link to comment
Ac[T]ioN Posted July 13, 2015 Share Posted July 13, 2015 guiSetText guiGridListGetSelectedItem guiGridListGetItemText ^ تفضل ي مبرمجنا . هههههههههههههههههههه والله العظيم إنت عسل Link to comment
terreus Posted July 13, 2015 Share Posted July 13, 2015 guiSetText guiGridListGetSelectedItem guiGridListGetItemText ^ تفضل ي مبرمجنا . وينه السيرفر لول Link to comment
Simple. Posted July 14, 2015 Share Posted July 14, 2015 guiSetText guiGridListGetSelectedItem guiGridListGetItemText ^ تفضل ي مبرمجنا . هههههههههههههههههههه والله العظيم إنت عسل وش فيكم يا شباب ترا هو يعرفه ، بس يبي يختبركم ويشوف كم خبرتكم بالبرمجه هو الحين يتعلم ال php Link to comment
terreus Posted July 14, 2015 Share Posted July 14, 2015 guiSetText guiGridListGetSelectedItem guiGridListGetItemText ^ تفضل ي مبرمجنا . هههههههههههههههههههه والله العظيم إنت عسل وش فيكم يا شباب ترا هو يعرفه ، بس يبي يختبركم ويشوف كم خبرتكم بالبرمجه هو الحين يتعلم ال php ضضضضضضضضضضضضضضضضضضضضضضضضضضضضضضضضضضض يا ماما صار برو قوي يتعلم php ضض Link to comment
#DRAGON!FIRE Posted July 14, 2015 Share Posted July 14, 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 guiGridListSetItemText ( GridList, Row, 2, math.random ( 400 ), false, false ); end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; -- end of ' function ' addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) list_ = guiCreateGridList ( ... ) -- انشاء اللستة button_ = guiCreateButton ( ... ) -- انشاء زر guiGridListAddColumn ( list_, "Player", 1 ) -- اضاف كولمن اللاعب guiGridListAddColumn ( list_, "Money", 2 ) -- اضافة كولمن الفلوس changeGridListItemToPlayersName ( list_, 1 ) -- نضيف اللاعبين والفلوس end ) addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == button_ ) then if ( guiGridListGetSelectedItem ( list_ ) ~= -1 ) then -- نتحقق انه اختار من اللستة local Player_ = guiGridListGetItemText ( list_, guiGridListGetSelectedItem ( list_ ), 1 ) -- جلبنا اسم اللاعب اللي اختاره local Money_ = guiGridListGetItemText ( list_, guiGridListGetSelectedItem ( list_ ), 2 ) -- جلبنا الفلوس حق اللاعب نفسه حق الرو نفسه اللي مختاره if ( getPlayerFromName ( Player_ ) ) then -- تحققنا ان اللاعب اللي مختاره موجود فعلا givePlayerMoney ( getPlayerFromName ( Player_ ), tonumber ( Money_ ) ) -- وعطيناه فلوس end end end end ) لو في شي ما فهمته تفضل اسال . Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 2015 ولله ما فهمت يخييي كان فيه موضوع في دروس البرمجهه لواحد في المنتدى فهمت بس بل اخر كان الشرح غلط !! هنا حسيت ان عقلي اتخربط يلا المهم شكرا ندور في قوقل لو فيه شرح نفهم منه منيح وبضبط من اول خطوه للاخر Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 2015 انا فيه فكره مود براسي بس المشكله تتوقف هناا في ذا القريد ليست Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 2015 ومين قال عم اتعلم ال PHP هو غلطان لساتني عم اتعلم لغه الفيجوال بيسك لحتى كملها ابدا بل c++ Link to comment
#DRAGON!FIRE Posted July 14, 2015 Share Posted July 14, 2015 كل شي واضح وسهل .. وش اللي ما فهمته بالضبط ؟ Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 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 guiGridListSetItemText ( GridList, Row, 2, math.random ( 400 ), false, false ); end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; -- end of ' function ' addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) list_ = guiCreateGridList ( ... ) -- انشاء اللستة button_ = guiCreateButton ( ... ) -- انشاء زر guiGridListAddColumn ( list_, "Player", 1 ) -- اضاف كولمن اللاعب guiGridListAddColumn ( list_, "Money", 2 ) -- اضافة كولمن الفلوس changeGridListItemToPlayersName ( list_, 1 ) -- نضيف اللاعبين والفلوس end ) addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == button_ ) then if ( guiGridListGetSelectedItem ( list_ ) ~= -1 ) then -- نتحقق انه اختار من اللستة local Player_ = guiGridListGetItemText ( list_, guiGridListGetSelectedItem ( list_ ), 1 ) -- جلبنا اسم اللاعب اللي اختاره local Money_ = guiGridListGetItemText ( list_, guiGridListGetSelectedItem ( list_ ), 2 ) -- جلبنا الفلوس حق اللاعب نفسه حق الرو نفسه اللي مختاره if ( getPlayerFromName ( Player_ ) ) then -- تحققنا ان اللاعب اللي مختاره موجود فعلا givePlayerMoney ( getPlayerFromName ( Player_ ), tonumber ( Money_ ) ) -- وعطيناه فلوس end end end end ) ترى عقلي تخربط ماني بهل مستوى ابي شوي شوي يعني شرح بسيط Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 2015 وكمان وش هو الكولمن ذا ما فهمته Link to comment
#DRAGON!FIRE Posted July 14, 2015 Share Posted July 14, 2015 الكولمن .. اللي يجي تحته الرو اللي يجي تحته السطور مثلا اللاعبين ________________________________ ZA7F Hassan الكود واضح يعني وشرحته لك الموضوع سهل لكن قولي انت وين بالضبط ؟ ولا ما فهمت شي ؟ Link to comment
Professional Posted July 14, 2015 Author Share Posted July 14, 2015 مثل ذا مثلا local Money_ = guiGridListGetItemText ( list_, guiGridListGetSelectedItem ( list_ ), 2 ) وش ذا list_, guiGridListGetSelectedItem ( list_ ), 2 وكيف حطيت _ ليش حطيته مثل ذا مثلا ( list_ ), 2 انا قصدي زول الرموز Link to comment
#DRAGON!FIRE Posted July 14, 2015 Share Posted July 14, 2015 guiGridListGetItemText = يجيب لك التكست حق الرو لو تقرا السنتكس Syntax string guiGridListGetItemText ( element gridList, int rowIndex, int columnIndex ) list_ اول ارقمنت يطلب منكـ اسم اللستة اللي هي rowIndex يطلب منكـ رقم الرو حنا حطينا guiGridListGetSelectedItem ( list_ ) هذا يرجع لك رقم الرو اللي مختاره اللاعب 2 = رقم الكولمن حق الفلوس 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