Mostafa MohammeD Posted April 1, 2016 Posted April 1, 2016 السلام عليكم شباب حبيت اسوي مود استئجار سويته واللوحة فتحت بس لما حطيت هاي الكود cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, }, for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end اللوحة ما اشتغلت ما صارت تفتح المهم الاكواد كلها GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetVisible(wnd,false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) end ) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, }, for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end ياريت تساعدوني وشكرا مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Mhmd.z Posted April 1, 2016 Posted April 1, 2016 اخوي لازم تضيف فنكشن عند اللوب يعني يصير الكود كذه function() for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end end
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 احذف سطر 5 و 6 واحذفف 33 و 34 واحذف الفاصلة بسطر 45 [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
MrSAUD1 Posted April 1, 2016 Posted April 1, 2016 GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetVisible(wnd,false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, }, for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end جرب كذا اكثر من مره انبه ما يصير كذا لنك مسوي وضيفة عند تشغيل المود و حاط القريد ليست فيها و كذا ما راح يعتبر معرف في الجدول اكثر من مره اقولها لا تضيفون حدث عند تشغيل المود للوحة ! :: العرب - MTA منتديات :: www.mtaarabs.com الحق / بتسجيل .. الاول موقع عربي .. يدعم لاعبين و سيرفرات و استضافات العبة ..
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetVisible(wnd,false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, }, for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end جرب كذا اكثر من مره انبه ما يصير كذا لنك مسوي وضيفة عند تشغيل المود و حاط القريد ليست فيها و كذا ما راح يعتبر معرف في الجدول اكثر من مره اقولها لا تضيفون حدث عند تشغيل المود للوحة ! الفاصلة سطر 44 تخرب الوضع <> [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
MrSAUD1 Posted April 1, 2016 Posted April 1, 2016 GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetVisible(wnd,false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, }, for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end جرب كذا اكثر من مره انبه ما يصير كذا لنك مسوي وضيفة عند تشغيل المود و حاط القريد ليست فيها و كذا ما راح يعتبر معرف في الجدول اكثر من مره اقولها لا تضيفون حدث عند تشغيل المود للوحة ! الفاصلة سطر 44 تخرب الوضع <> ما انتبهت للفصلة بضبط بس سويت المطلوب و هو حذفت الحدث و الوضيفة للوحة :: العرب - MTA منتديات :: www.mtaarabs.com الحق / بتسجيل .. الاول موقع عربي .. يدعم لاعبين و سيرفرات و استضافات العبة ..
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 مشكور شكرا لكم الكود اشتغل مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 العفو , حياك [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 ممكن الفنكشن يلي يعطي اللاعب سيارة مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 ممكن الفنكشن يلي يعطي اللاعب سيارة table createVehicle حاول فيها واساعدك [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 ممكن الفنكشن يلي يعطي اللاعب سيارة table createVehicle حاول فيها واساعدك مب فاهمني ابي لما يضغط زر مثلا يعطيه سيارة مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 ممكن الفنكشن يلي يعطي اللاعب سيارة table createVehicle حاول فيها واساعدك مب فاهمني ابي لما يضغط زر مثلا يعطيه سيارة طيب يوم يضغط الزر سوي ترايقر للسيرفر triggerServerEvent تستقبل الترايقر بالسيرفر وتحط باول سطر table ={} هنا سوينا تيبل بعد ماستقبلت الترايقر تحقق ان مامعه سيارة او انه موب راكب سيارة if isPedInVehicle ( source ) then return end -- لو كان بسيارة نرجع مانكمل الوظيفة if table [source] and isElement ( table [source] ) then return end -- كانت السيارة موجودة نرجع مانكمل الوظيفة table[source] = createVehicle ( ... ) -- هنا نسوي السيارة وبس # [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 بردو مب فاهم انا مسوي لوحة تتفتح من اف 9 فيها جريد ليست وزر ابي لما يختار سيارة من الجريد ليست ويدوس الزر يعطيه سيارة ما في فنكشن يسوي هيك مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 خلاص اعتقد فهمتك تقصد هيك مثلا ؟؟ gc = {} local x, y, z = getElementPosition(localPlayer) gc[Player] = createVehicle( id, x, y, z) warpPedIntoVehicle(localPlayer,tc[Player]) لو في اخطاء في الكود عادي انا اقصد بس الفكرة في صنع الكود مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
iMr.WiFi..! Posted April 1, 2016 Posted April 1, 2016 يب كذا قصده .. مادام انه الكود زبط معك ورضى طلبك يعني كذا قصده ^^ 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)
Adham Posted April 1, 2016 Posted April 1, 2016 (edited) اخوي لازم تسوي داتا لكل رو الحين مب مقسم انت لاكثر من اريقومنت مثلا local table = { ["Le3bA"123}, ["Adham"123}, } الارقيومنت الاول فيه اسمي التاني في رقم نفس الشي ب السيارات الاول فيه اسم السياره التانيه فيها الاي دي مثال -- local table { {"NameCar",ID}, } اول شي الريقومنت الاول سترونق ستنروق يعني كذا " " بين ذول العلامتين وهذا اسم السياره والبعده اي دي لازم تحد داتا للاي دي علشان يوم يطق علي السياره ينتقل فهمت؟ Edited April 1, 2016 by Guest قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل
iMr.WiFi..! Posted April 1, 2016 Posted April 1, 2016 خلاص اعتقد فهمتكتقصد هيك مثلا ؟؟ gc = {} local x, y, z = getElementPosition(localPlayer) gc[Player] = createVehicle( id, x, y, z) warpPedIntoVehicle(localPlayer,tc[Player]) لو في اخطاء في الكود عادي انا اقصد بس الفكرة في صنع الكود 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)
Abdul KariM Posted April 1, 2016 Posted April 1, 2016 خلاص اعتقد فهمتكتقصد هيك مثلا ؟؟ gc = {} local x, y, z = getElementPosition(localPlayer) gc[Player] = createVehicle( id, x, y, z) warpPedIntoVehicle(localPlayer,tc[Player]) لو في اخطاء في الكود عادي انا اقصد بس الفكرة في صنع الكود ايوا كذا بالضبط بالكلينت ماراح تقدر تركب السيارة , سويها بالسيرفر مع الجدول [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
Adham Posted April 1, 2016 Posted April 1, 2016 شبأب هوا يقصد هوا عامل لوحه مثلن تفتح ب "ف8" و عمل قريد ليست فيها وراح كلينت وعمل جدول وحط الكود ذا for _, v in ipairs (car) do local Row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 1, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 2, v[2], false, false) end وعاوز اليضعط علي واحده منهم يجيلو سياره فا لازم يعمل داتا يشوف الشرح فوق القلتلو له وانشالله يستفيد car { {"NameCar",ID}, {"Camry2016",15}, } قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 شكرا شباب ما قصرتو شبأب هوا يقصدهوا عامل لوحه مثلن تفتح ب "ف8" و عمل قريد ليست فيها وراح كلينت وعمل جدول وحط الكود ذا for _, v in ipairs (car) do local Row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 1, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 2, v[2], false, false) end وعاوز اليضعط علي واحده منهم يجيلو سياره فا لازم يعمل داتا يشوف الشرح فوق القلتلو له وانشالله يستفيد car { {"NameCar",ID}, {"Camry2016",15}, } شوف الموضوع فوق خالص في الاكواد الكاملة وبتلاقي الكود مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
Mostafa MohammeD Posted April 1, 2016 Author Posted April 1, 2016 ما اشتغلو -- client GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") guiSetVisible(wnd,false) grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) addEventHandler("onClientGUIClick",root, function () if source == close then guiSetVisible(wnd,false) showCursor(false) end end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, } for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local id = unpack(guiGridListSetItemData(grid,row,1,v[2])) local money = unpack (guiGridListSetItemData(grid,row,2,v[3])) if source == buy then if sel ~= -1 then triggerServerEvent("givecar",source) end end end ) -- server gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElment (gv[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gv[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gv[Player]) takePlayerMoney(localPlayer,money) end) المشكلة انو لما احدد سيارة وادوس علي الزر ما يعطني السيارة ولا يسحب المال مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
iMr.WiFi..! Posted April 1, 2016 Posted April 1, 2016 ما اشتغلو -- client GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") guiSetVisible(wnd,false) grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) bindKey("F9","down", function () guiSetVisible (wnd ,not guiGetVisible (wnd)) showCursor(guiGetVisible(wnd)) end ) addEventHandler("onClientGUIClick",root, function () if source == close then guiSetVisible(wnd,false) showCursor(false) end end ) cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, } for k,v in ipairs(cars) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,v[1],false,false) guiGridListSetItemText(grid,row,2,v[3],false,false) guiGridListSetItemData(grid,row,1,v[2]) guiGridListSetItemData(grid,row,2,v[3]) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local id = unpack(guiGridListSetItemData(grid,row,1,v[2])) local money = unpack (guiGridListSetItemData(grid,row,2,v[3])) if source == buy then if sel ~= -1 then triggerServerEvent("givecar",source) end end end ) -- server gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElment (gv[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gv[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gv[Player]) takePlayerMoney(localPlayer,money) end) المشكلة انو لما احدد سيارة وادوس علي الزر ما يعطني السيارة ولا يسحب المال gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElement (gc[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gc[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gc[Player]) takePlayerMoney(localPlayer,money) end) 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)
Mr.R Posted April 2, 2016 Posted April 2, 2016 Client local Cars = { { "Ferrari", 250, 100000 }, { "Nissan", 130, 2000000 }, } for _,v in ipairs ( Cars ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, v[1], false, false ) guiGridListSetItemText ( grid, row, 2, v[3], false, false ) guiGridListSetItemData ( grid, row, 1, v[2] ) end addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == buy ) then if ( guiGridListGetSelectedItem ( grid ) ~= -1 ) then local Money = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 2 ) local CarName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) local iD = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if ( Money ~= "" and iD ~= "" and CarName ~= "" ) then triggerServerEvent ( "GiveCar", localPlayer, iD, Money, CarName ) end else outputChatBox ( "* الرجاء اختيار سيارهـ اولاً", 255, 0, 0, true ) end end ) Server local Vehicle = { }; addEvent ( "GiveCar", true ) addEventHandler ( "GiveCar", root, function ( iD, Money, CarName ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) end if ( getPlayerMoney ( source ) >= tonumber ( Money ) ) then takePlayerMoney ( source, tonumber ( Money ) ) outputChatBox ( "* $".. tonumber ( Money ) .." بـ ".. CarName .." تم شراء السيارهـ", source, 255, 255, 255, true ) else outputChatBox ( "* ".. CarName .." لا تملك المال الكافي لـ شراء", source, 255, 255, 255, true ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( iD, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) end ) لم تتم التجربه * There is no God but Allah, Mohammed is the Messenger Of Allah
Adham Posted April 2, 2016 Posted April 2, 2016 local bind = 'F7' GUIEditor = { label = {} } -- -------cars cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, } --------------- local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") guiSetVisible(wnd,false) grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) --------- bindKey (bind,'down', function () guiSetVisible (wnd,not guiGetVisible (wnd)) showCursor (guiGetVisible (wnd)) end) ------- addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == close ) then guiSetVisible(wnd,false) showCursor(false) end end ) for _, v in ipairs (cars) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData ( grid, row, 1, v[2] ) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local id = unpack(guiGridListSetItemData(grid,row,1,v[2])) local money = unpack (guiGridListSetItemData(grid,row,2,v[3])) if ( source == buy ) then if sel ~= -1 then triggerServerEvent("givecar",source) end end end ) gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElement (gc[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gc[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gc[Player]) takePlayerMoney(localPlayer,money) end) قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل
Jupi Posted April 2, 2016 Posted April 2, 2016 local bind = 'F7' GUIEditor = { label = {} } -- -------cars cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, } --------------- local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") guiSetVisible(wnd,false) grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) --------- bindKey (bind,'down', function () guiSetVisible (wnd,not guiGetVisible (wnd)) showCursor (guiGetVisible (wnd)) end) ------- addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == close ) then guiSetVisible(wnd,false) showCursor(false) end end ) for _, v in ipairs (cars) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData ( grid, row, 1, v[2] ) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local id = unpack(guiGridListSetItemData(grid,row,1,v[2])) local money = unpack (guiGridListSetItemData(grid,row,2,v[3])) if ( source == buy ) then if sel ~= -1 then triggerServerEvent("givecar",source) end end end ) gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElement (gc[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gc[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gc[Player]) takePlayerMoney(localPlayer,money) end) زاد الهريس هرساً كفو
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