#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 (edited) local = متغير مثال addCommandHandler("myname", function() local localPlayerName = getPlayerName(localPlayer) outputChatBox(localPlayerName) end ) List = { -- سوينا جدول {"البداية -1",832.931640625, -4505.3212890625, 13.8719911575317}, {"آلدآئري -2",1797.1727294922, 842.46630859375, 10.6328125}, {"آلنخيل -3",2068.7211914063, 907.06707763672, 8.1701345443726}, {"آلطعوس -4",-2617.193359375, -2547.3530273438, 3}, {"آلغروب -5",662.55310058594, 1936.7479248047, 5.5052728652954}, {"الشارع الطويل -6",-2876.2788085938, -3004.4331054688, 12.39999961853}, {"البنك -7",596.37750244141, -1241.4223632813, 18.39999961853}, {"المطار الاول -8",1717.6470947266, -2494.1176757813, 13.39999961853}, {"المطار الثاني -9",-1223.4300537109, -185.74758911133, 14.39999961853}, {"المطار الثالث -10",1411.7646484375, 1482.3529052734, 10.89999961853}, } GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(438, 249, 284, 337, "التنقل", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 30, 265, 234, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "أسم المكان", 0.9) for k,v in ipairs(List) do -- نجيب الي حطيناه بالجدول local row = guiGridListAddRow(GUIEditor.gridlist[1]) -- نسوي رو بالجدول guiGridListSetItemText(GUIEditor.gridlist[1],row,1,v[1],false,false) -- نحط اسماء الأماكن مثلا الغروب ونحطهم في رو guiGridListSetItemData(GUIEditor.gridlist[1],row,1,{v[2],v[3],v[4]}) -- نحط داتا end GUIEditor.button[1] = guiCreateButton(9, 300, 82, 27, "نقل", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(192, 301, 82, 26, "أغلاق", false, GUIEditor.window[1]) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) ) ) outputChatBox ( "* تم الإنتقال بنجاح", 0, 255, 0, true ) else outputChatBox ( "* الرجاء اختيار مكان للإنتقال إليه", 255, 0, 0, true ) end end end ) bindKey ("F2", "down", function () guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end) هذي على اكواد لوحتك تفتح من اف 2 Edited March 25, 2016 by Guest Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 for k,v in ipairs(List) do -- نجيب الي حطيناه بالجدول ما فهمت شي من هنا
#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 for k,v in ipairs(List) do -- نجيب الي حطيناه بالجدولما فهمت شي من هنا الحين انا مو سويت جدول ؟ كيف راح يجيب الي بالجدول ؟ يعني الجن راح يجيب الاماكن الي بالجدول ض2 باختصار هذا يجيب الشي الي حاطه بالجدول في حالتنا هو بيجيب الاماكن الي حطيناها بالجدول اتعشى واجيك .. Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 for k,v in ipairs(List) do يعني ذا الكود يلي فوق دايما احطه لما احط جدول؟؟ وبين القوسين اسم المتغير؟؟
Mostafa MohammeD Posted March 25, 2016 Posted March 25, 2016 for k,v in ipairs(List) doيعني ذا الكود يلي فوق دايما احطه لما احط جدول؟؟ وبين القوسين اسم المتغير؟؟ https://forum.multitheftauto.com/viewtopic.php?f=160&t=97915 شوف الاشياء يلي به من بيست وتابل مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 for k,v in ipairs(List) doيعني ذا الكود يلي فوق دايما احطه لما احط جدول؟؟ وبين القوسين اسم المتغير؟؟ يب بين القوسين اسم متغير الجدول بتحتاجه عشان تجلب الي بالجدول Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 انا بديت افهم شوية من كودك الاخير ضض بحاول اسوي لوحة واشوف لو في اخطاء
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 MD = { {"1-الجبل",-2242.18115,-1726.20325,480.39978} {"2-الصحراء",214.83893,1863.85681,13.14063} {"3-حارة سي جي",2384.80933,-1669.25671,13.73438} } GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(72, 231, 231, 265, "الأنتقالات", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(10, 43, 211, 134, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الأماكن", 0.9) for k,v in ipairs(MD) do s = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],s,1,v[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],s,1,{v[2],v[3],v[4]}) end GUIEditor.button[1] = guiCreateButton(9, 222, 212, 33, "أغلاق", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(10, 179, 211, 33, "نقل", false, GUIEditor.window[1]) end ) addEventHandler ("onClientGUIClick",root, function () if (source == GUIEditor.button[2]) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) ) ) outputChatBox ( "* تم الإنتقال بنجاح", 0, 255, 0, true ) else outputChatBox ( "* الرجاء اختيار مكان للإنتقال إليه", 255, 0, 0, true ) end end end ) bindKey ("F2", "down", function () guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end) في اشياء ما نسختها واشياء ما فهمتها ونسختها المهم يقولي خطأ بسطر 3
Mr.R Posted March 25, 2016 Posted March 25, 2016 MD = { {"1-الجبل",-2242.18115,-1726.20325,480.39978} {"2-الصحراء",214.83893,1863.85681,13.14063} {"3-حارة سي جي",2384.80933,-1669.25671,13.73438} } GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(72, 231, 231, 265, "الأنتقالات", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(10, 43, 211, 134, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "الأماكن", 0.9) for k,v in ipairs(MD) do s = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],s,1,v[1],false,false) guiGridListSetItemData(GUIEditor.gridlist[1],s,1,{v[2],v[3],v[4]}) end GUIEditor.button[1] = guiCreateButton(9, 222, 212, 33, "أغلاق", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(10, 179, 211, 33, "نقل", false, GUIEditor.window[1]) end ) addEventHandler ("onClientGUIClick",root, function () if (source == GUIEditor.button[2]) then if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) ) ) outputChatBox ( "* تم الإنتقال بنجاح", 0, 255, 0, true ) else outputChatBox ( "* الرجاء اختيار مكان للإنتقال إليه", 255, 0, 0, true ) end end end ) bindKey ("F2", "down", function () guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end) في اشياء ما نسختها واشياء ما فهمتها ونسختها المهم يقولي خطأ بسطر 3 جرب كذا MD = { {"1-الجبل",-2242.18115,-1726.20325,480.39978}, {"2-الصحراء",214.83893,1863.85681,13.14063}, {"3-حارة سي جي",2384.80933,-1669.25671,13.73438}, } * There is no God but Allah, Mohammed is the Messenger Of Allah
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 مشكور Mr.R strong بس في شغلات حاولت افهمها ما رضت تتدخل بدماغي مثلن if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) ليه حطيت لا يساوي -1؟؟ guiGridListClear getElementsByType -- loop ( player ) guiGridListAddRow guiGridListSetItemText - guiGridListGetItemText guiGridListGetSelectedItem بالنسبة لردك الاول ممكن تحط كل واحد وش وظيفته جمبه ويكون واضح شوية
#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 مشكور Mr.R strong بس في شغلات حاولت افهمها ما رضت تتدخل بدماغي مثلن if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) ليه حطيت لا يساوي -1؟؟ guiGridListClear getElementsByType -- loop ( player ) guiGridListAddRow guiGridListSetItemText - guiGridListGetItemText guiGridListGetSelectedItem بالنسبة لردك الاول ممكن تحط كل واحد وش وظيفته جمبه ويكون واضح شوية اعتقد معناه اذا كان شي واحد محدد بالنسبة للفنكشنات guiGridListClear -- هذا عشان ما يكرر الاسماء مرتين بالقريد ليست getElementsByType -- loop ( player ) -- يسوي لوب لكل اللاعبين يعني يجيب كل اللاعبين guiGridListAddRow -- يسويلهم أضافة رو guiGridListSetItemText -- يحط الكلام , مثلا يحط اسم اللاعبين نستخدمه مع الفنكشن الي تحت getPlayerName -- يجيب اسماء اللاعبين - guiGridListGetItemText -- يجيب الكلام الي بالقريد ليست guiGridListGetSelectedItem -- يجب الشي الي حددناه Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 اعتقد معناه اذا كان شي واحد محدد بالنسبة للفنكشنات مب فاهم :]
iMr.WiFi..! Posted March 25, 2016 Posted March 25, 2016 Deleted*-------------------------------------- ششكراً ..بس اخاف اني ما استفيد حاجةة المهم بكمل الباقي .. وهو الزر اذا سويته ,, ويلا الحين ابرمج ,, ابي استفسر local wifii = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) if wifii~= -1 then Returns the row and column indexes of the selected item if the specified grid list is valid and has a selected item, (-1, -1) if no item is selected, false otherwise. (row) دة تحقق ان الجريد ليست فيها حاجة متحددة بالماوس يرجعلك القيمة 1 لو انت محدد حاجة و يرجعلك القيمة -1 لو انت مش محدد حاجة local wifii = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) > wifii == 1 -- local wifii = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) > wifii == -1 -- يوضحكك Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 بأختصار معناه اذا ما كان محدد شي من القريد ليست Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 الجريد ليست بدها واحد صاحي مب نايم هههههه بروح انام بكرة بشوف كيف الوضع تصبحون على خير
Me[Z]oO Posted March 25, 2016 Posted March 25, 2016 الجريد ليست بدها واحد صاحي مب نايم هههههه بروح انام بكرة بشوف كيف الوضعتصبحون على خير وانت من أهل الخير : ] Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
#StrOnG_,) Posted March 25, 2016 Posted March 25, 2016 الجريد ليست بدها واحد صاحي مب نايم هههههه بروح انام بكرة بشوف كيف الوضعتصبحون على خير وانت من اهل الخير .. Quote "I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them, I'm just playing with ya. I don't care where the top is, Leave me at the bottom, let me work for it." _________________________________________________________________________________________________________________ ACM W_#9661
taha201100 Posted March 25, 2016 Author Posted March 25, 2016 سؤال بس انا سويت ميمو لكن لما اركبها واشغل المود الاعب يقدر يكتب بالميمو ابيه ما ينفع يكتب شي بالميمو كيف؟؟
#|_oskar_|# Posted March 25, 2016 Posted March 25, 2016 سؤال بس انا سويت ميمو لكن لما اركبها واشغل المود الاعب يقدر يكتب بالميمو ابيه ما ينفع يكتب شي بالميمو كيف؟؟ guiMemoSetReadOnly لا اله الا انت سبحانك اني كنت من الظالمين My Group : https://www.facebook.com/groups/992678147519191/
taha201100 Posted March 26, 2016 Author Posted March 26, 2016 guiMemoSetReadOnly( memo, true ) احطه وبعدين ما يقدر يكتب؟
#|_oskar_|# Posted March 26, 2016 Posted March 26, 2016 يب حطه تحت الميمو ملاحظه تقدر تسويه من الجيو اديتور وانت بتصمم اللوحه read only لما تختار الميمو وتحطه داخل اللوحه بتلاقي كلمه اسمها حط عليها علامة الصح وبكذا تخلي اللاعب مايقدر يكتب لا اله الا انت سبحانك اني كنت من الظالمين My Group : https://www.facebook.com/groups/992678147519191/
#|_oskar_|# Posted March 26, 2016 Posted March 26, 2016 اشكرك دب جدا جدا توني انتبه العفو لا اله الا انت سبحانك اني كنت من الظالمين My Group : https://www.facebook.com/groups/992678147519191/
LoOs Posted March 26, 2016 Posted March 26, 2016 في فنكشن يحذف الماركراو يعطله مؤقت destroyElement Discord: LoOs#1111 _____________________________
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