#kAsR Posted July 1, 2016 Share Posted July 1, 2016 (edited) سلام عليكم ورحمة الله وبركاته ياجماعة انا عندي جدول كذا اوك ؟ Teleporting = { ["الاماكن الرئسية"] = { ["الدائري"] = {x,y,z}, }, } انا ابي مثال لو ظغط كلك يمين على الرو حق الاماكن الرئسية يجيب لي احداثيات الدائري كيف ؟؟ Edited July 1, 2016 by Guest Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 تجيب اللي اختارهـ من اللستة وتتصل بالتيبل وتجلبهم بسيطة جدا guiGridListGetItemText guiGridListGetSelectedItem Link to comment
The moVer Posted July 1, 2016 Share Posted July 1, 2016 تجيب اللي اختارهـ من اللستة وتتصل بالتيبل وتجلبهم بسيطة جدا guiGridListGetItemText guiGridListGetSelectedItem طيب اذا ما في رصيد هههههههههههههههه Link to comment
#kAsR Posted July 1, 2016 Author Share Posted July 1, 2016 @#ZA7F //= يعطيك العافيه . سويت الطريقة ونجحت addEventHandler("onClientGUIDoubleClick",resourceRoot, function ( ) if ( source == GridList ) then local Selectort = guiGridListGetSelectedItem ( source ) if ( Selectort ~= -1 ) then if ( guiGridListGetItemText ( source , Selectort , 1 ) == "..." ) then guiGridListClear ( GridList ) for index,values in pairs ( Teleporting ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList , row , 1 , tostring ( index ) , false , false ) end else local Text = guiGridListGetItemText ( source , Selectort , 1 ) for index,v in pairs ( Teleporting[Text] ) do guiGridListClear ( source ) guiGridListSetItemText ( source , guiGridListAddRow ( source ) , 1 ,"..." , false , false ) local row = guiGridListAddRow ( source ) guiGridListSetItemText ( source , row , 1 , tostring ( index ) , false , false ) end end end end end ) نأقص شي واحد بس : الي هو لو اظغط على الدائري مثلأ يجي خطأ بالدي بوق بـ table الي هو السطر ذا for index,v in pairs ( Teleporting[Text] ) do ماعندي طريقة عشان اسويها ياليت لو عندك طريقة قولي Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 ممكن تطرح الجدول + تفهمني من بداية السطر اللي فيه خطا اللي نهاية الكود وش الهدف منه ما فهمت Link to comment
#kAsR Posted July 1, 2016 Author Share Posted July 1, 2016 Teleporting = { ["الاماكن الرئسية"] = { ["الدائري"] = {0,0,2}, }, } function RefreshGridList ( ) guiGridListClear ( GridList ) for index,values in pairs ( Teleporting ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList , row , 1 , tostring ( index ) , false , false ) end end addEventHandler("onClientResourceStart", resourceRoot, function() Window = guiCreateWindow(253, 116, 333, 379, "Teleport", false) guiWindowSetSizable(Window, false) guiSetAlpha(Window, 1.00) guiSetProperty(Window, "CaptionColour", "FF00FF00") GridList = guiCreateGridList(9, 34, 314, 324, false, Window) guiGridListAddColumn(GridList, "Places :", 0.9) RefreshGridList ( ) showCursor ( true ) end ) addEventHandler("onClientGUIDoubleClick",resourceRoot, function ( ) if ( source == GridList ) then local Selectort = guiGridListGetSelectedItem ( source ) if ( Selectort ~= -1 ) then if ( guiGridListGetItemText ( source , Selectort , 1 ) == "..." ) then RefreshGridList ( ) else local Text = guiGridListGetItemText ( source , Selectort , 1 ) for index,v in pairs ( Teleporting[Text] ) do guiGridListClear ( source ) guiGridListSetItemText ( source , guiGridListAddRow ( source ) , 1 ,"..." , false , false ) local row = guiGridListAddRow ( source ) guiGridListSetItemText ( source , row , 1 , tostring ( index ) , false , false ) end end end end end ) ابي لو ظغط على الاماكن الرئيسة يجيب الاماكن الي داخل الجدول ويمسح القريد ليست ويحط الاماكن الي هي الدائري بس ماعندي طريقة لو ظغط على الدائري ينقله للاحداثيات الي بالجدول توضيح : http://prntscr.com/bnnric http://prntscr.com/bnnrno Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 جرب كذا .. : local section_ = "" addEventHandler ( "onClientGUIDoubleClick", resourceRoot, function ( ) if ( source == GridList ) then local Selectort = guiGridListGetSelectedItem ( source ) if ( Selectort ~= -1 ) then if ( guiGridListGetItemText ( source, Selectort, 1 ) == "..." ) then RefreshGridList ( ) section_ = "" else if ( section_ == "" ) then local Text = guiGridListGetItemText ( source, Selectort , 1 ) guiGridListClear ( source ) guiGridListSetItemText ( source, guiGridListAddRow ( source ) , 1 , "..." , false, false ) for index,v in pairs ( Teleporting[Text] ) do Row = guiGridListAddRow ( source ) guiGridListSetItemText ( source, Row , 1 , index , false , false ) end section_ = Text else local p_ = guiGridListGetItemText ( source, Selectort , 1 ) local PosTable = Teleporting[section_][p] setElementPosition ( localPlayer, unpack(PosTable) ) end end end end end ) Link to comment
#kAsR Posted July 1, 2016 Author Share Posted July 1, 2016 @#ZA7F //= يعطيك الف عافيه اخوي زاحف ماقصرت والله سطر 22 مو معرفة p انت نسيت تحط p_ بس عوافي ظبط يعطيك الف عافيه Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 يب نسيت احط الشرطة الله يعافيك ^ Link to comment
Mr.CoR Posted July 1, 2016 Share Posted July 1, 2016 يب نسيت احط الشرطة الله يعافيك ^ ولا الدفاع المدني عهههههههههههههههههههه Link to comment
#DRAGON!FIRE Posted July 1, 2016 Share Posted July 1, 2016 روح كمل بموضوع الشكوى حقك الله يهديك Link to comment
Mr.CoR Posted July 1, 2016 Share Posted July 1, 2016 روح كمل بموضوع الشكوى حقك الله يهديك شوف الرد التفجيري الحين 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