Mr.R
Members-
Posts
775 -
Joined
-
Last visited
Everything posted by Mr.R
-
^ حذفت سطر 6 , ماشوف له داعي جرب الحيين
-
جرب صلحته وصلحتها Moneny الي داخل الفنكشن كذا Money الغلط الرئيسي كانت ... ويسلمون الشباب ماقصروا
-
تفضل , اعتقد كل شيء واضح واذا مافهمت حاجه اسأل وحاول تفهم التعديلات لاتنسخ وتلصق #Client Side local Vehicles = { { "Alpha", 602, 1000 }, { "Banshee", 429, 2000 }, { "Buffalo", 402, 3000 }, { "Bullet", 541, 4000 }, { "Cheetah", 415, 5000 }, { "Comet", 480, 6000 }, { "Elegy", 562, 7000 }, { "Euros", 587, 8000}, { "Flash", 565, 9000}, { "Jester", 559, 10000 }, { "Phoenix", 603, 20000 }, { "Sultan", 560, 30000 }, { "Super GT", 506, 40000 }, { "Turismo", 451, 50000 }, { "Uranus", 558, 60000 }, { "NRG-500", 522, 70000 }, { "Infernus", 411, 90000 }, } for i,v in ipairs ( Vehicles ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, tostring ( v[1] ), false , false ) guiGridListSetItemText ( grid, row, 2, "$"..v[3] , false , false ) guiGridListSetItemColor ( grid, row, 2, 0, 255, 0 ) guiGridListSetItemData ( grid, row, 1, v[2] ) end addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then if ( guiGridListGetSelectedItem ( grid ) ~= -1 ) then local Money = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 2 ) local iD = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if ( Money ~= '' and iD ~= '' ) then triggerServerEvent ( "Cars", localPlayer, iD, string.sub ( Money, 2, string.len ( Money ) ) ) guiSetVisible( wnd, false ) showCursor ( false ) end else outputChatBox ( "* الرجاء اختيار سيارهـ", 255, 255, 255, true ) end end end ) #Server Side local Vehicle = { }; addEvent ( "Cars", true ) addEventHandler ( "Cars", root, function ( iD, Money ) if ( getPlayerMoney ( source ) >= tonumber ( Money ) ) then takePlayerMoney ( source, tonumber ( Money ) ) outputChatBox ( "* [ "..tonumber ( Money ).." ] بـ هذا المبلغ [ "..getVehicleNameFromID ( iD ).." ] لقد اشتريت السيارهـ", source, 0, 255, 0, true ) else outputChatBox ( "* لا تملك المال الكافي لـ شراء سيارهـ", source, 255, 0, 0, true ) end if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( iD, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) واذا تبي السيارهـ تختفي بعد ماتنفجر مباشرهـ استخدم هذا الحدث Event : "onVehicleExplode" وهذا الفنكشن destroyElement ... طبعاً من جانب سيرفر
-
ابن ولا ابنة أبنه ولا , قهوهه .. يشربها قط ميت ابنه ولا ابنته
-
ترى فيه موضوع ل السماجه رح تسيمج هناك
-
تخيل تقوم من النوم وتلقى الشمس شارقه من المغرب
-
معليش الغلط من الميتا عندي وعموماً هذي اكوادك كامله ياصاحب الموضوع الي عليك بس تغير الايديات سطر 22 , 25 , 28 للسيارات الي تبيها #Client Side local Marker = createMarker ( 2045.46753, 1535.68384 ,10.67188, "cylinder", 1, 47, 0, 255 ) GUIEditor = { button = {}, window = {}, } Window = guiCreateWindow ( 341, 214, 357, 248, "لوحة المواتر الخاصه بك | Server ProGamer", false ) guiWindowSetSizable ( Window, false ) guiSetVisible ( Window, false ) Button1 = guiCreateButton ( 56, 40, 233, 59, "مركبة | Vehicle", false, Window ) Button2 = guiCreateButton ( 55, 110, 235, 54, "دراجة نارية | Motorcycle", false, Window ) Button3 = guiCreateButton ( 56, 172, 236, 50, "دبابة | Tank", false, Window ) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( player ) if getElementType ( player ) and ( source == Marker ) then guiSetVisible ( Window, true ) showCursor ( true ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then iD = 500 -- حط الايدي الي تبيه هنا triggerServerEvent ( "Car", localPlayer , iD ) elseif ( source == Button2 ) then iD = 569 -- حط الايدي الي تبيه هنا triggerServerEvent ( "Car", localPlayer , iD ) elseif ( source == Button3 ) then iD = 547 -- حط الايدي الي تبيه هنا triggerServerEvent ( "Car", localPlayer , iD ) end end ) addEvent ( "CloseWindow", true ) addEventHandler ( "CloseWindow", root, function ( ) guiSetVisible ( Window, false ) showCursor ( false ) end ) #Server Side local Vehicle = { } addEvent ( "Car", true ) addEventHandler ( "Car", root, function ( iD ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( iD, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox ( "* تم اعطاؤك مركبة", source, 255, 255, 255, true ) if ( isPedInVehicle ( source ) ) then triggerClientEvent ( source, "CloseWindow", source ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) destroyElement ( source ) end ) ...وللمعلوميه هنا تلقى جميع ايديات السيارات او القطارات او الطيارات إلخ https://wiki.multitheftauto.com/wiki/Vehicle_IDs وحبيت اضيف على الاكواد هذا الحدث addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) destroyElement ( source ) end ) عشان اي سياره تنفجر ( ماخذها من الماركر ) يعني صانعها المود نفسه .. تختفي
-
العفو , الله يهديك شوف زين ض1 صحيح معرفه بارقام وهذي قيمه , انا قصدي getVehicleID لاني جربت تعديلك وماضبط
-
مشكور , ماقصرت عرفت الطريقه الحين + مو معرفه id عندك خطا
-
X انت تعطيه السياره في كلنت يعني محد يشوفها الا هو سيارهه وهميه عموماً هذا الكود من جانب كلينت local Marker = createMarker ( 220.34393310547, 1921.0068359375, 16.640625, "cylinder", 1, 47, 0, 255 ) GUIEditor = { button = {}, window = {}, } Window = guiCreateWindow ( 341, 214, 357, 248, "لوحة المواتر الخاص بك | Server ProGamer", false ) guiWindowSetSizable ( Window, false ) guiSetVisible ( Window, false ) Button1 = guiCreateButton ( 56, 40, 233, 59, "مركبة | Vehicle", false, Window ) Button2 = guiCreateButton ( 55, 110, 235, 54, "دراجة نارية | Motorcycle", false, Window ) Button3 = guiCreateButton ( 56, 172, 236, 50, "دبابة | Tank", false, Window ) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( player ) if getElementType ( player ) and ( source == Marker ) then guiSetVisible ( Window, true ) showCursor ( true ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function( ) if ( source == Button1 ) then triggerServerEvent ( "Car1", localPlayer ) elseif ( source == Button2 ) then triggerServerEvent ( "Car2", localPlayer ) elseif ( source == Button3 ) then triggerServerEvent ( "Car3", localPlayer ) end end ) addEvent ( "CloseWindow", true ) addEventHandler ( "CloseWindow", root, function ( ) guiSetVisible ( Window, false ) showCursor ( false ) end ) وهذا الكود من جانب سيرفر local Vehicle = { } addEvent ( "Car1", true ) addEventHandler ( "Car1", root, function ( ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( هنا تحط ايدي السياره الاولى الي تبيها, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox ( "* تم اعطاؤك مركبة", source, 255, 255, 255, true ) if ( isPedInVehicle ( source ) ) then triggerClientEvent ( source, "CloseWindow", source ) end end ) addEvent ( "Car2", true ) addEventHandler ( "Car2", root, function ( ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( هنا تحط ايدي السياره الاولى الي تبيها, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox ( "* تم اعطاؤك دراجة نارية", source, 255, 255, 255, true ) if ( isPedInVehicle ( source ) ) then triggerClientEvent ( source, "CloseWindow", source ) end end ) addEvent ( "Car3", true ) addEventHandler ( "Car3", root, function ( ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) end local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( هنا تحط ايدي السياره الاولى الي تبيها, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox ( "* تم اعطاؤك دبابة", source, 255, 255, 255, true ) if ( isPedInVehicle ( source ) ) then triggerClientEvent ( source, "CloseWindow", source ) end end ) addEventHandler ( "onPlayerQuit", resourceRoot, function ( ) if ( Vehicle[source] ) and isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) ملاحظه : ماني متاكد من ملف سيرفر
-
^ هذا مثال بسيط , بس بالجدول ويكون افضل عشان لو تضيف مليون سياره عادي local CarsTable = { -- طبعاً تقدر تضيف العدد الي تبغاه من السيارات إلى مالا نهايه { "Car1", 411 }, -- السياره الاولى { "Car2", 412 }, -- السياره الثانيه -- { "Car3", 413 }, نفس الطريقه عشان تضيف سياره بعد } GridList = guiCreateGridList(9, 22, 416, 249, false, Window) -- قريد ليست guiGridListAddColumn(GridList, "السيارات ...", 0.9) -- Culmon for _,v in ipairs ( CarsTable ) do -- لوب للسيارات local Row = guiGridListAddRow ( GridList ) -- نسوي لكل قيمه بالجدول سطر في القريد ليست عشان تقدر تحدد عليها guiGridListSetItemText ( GridList, Row, 1, v[1], false, false ) -- نحط اسم كل قيمه بالجدول في الكولمن الاول في القريد ليست guiGridListSetItemData ( GridList, Row, 1, v[2] ) -- نسوي داتا للايديات end -- for اند الـ طلبك بسيط , حاول وبساعدك واذا ماتبي بجدول قل عادي
-
اذا تبي شكله زي ماقالو الشباب فوق مالي خبره فيها والله واذا قصدك العلامات الي فيه تستخدم createBlip
-
ترى ماحملته .. الزبده طلع ملغمه ؟؟
-
اذا ما شفره بعد كم يوم يجي واحد ومسوي سيرفر ومهايطي ويكتب بالقيم Gamemode By ..... يـ كثر الناس الي يسوون الحركات ذي +1
-
addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) -- حدث عند الضغط على الزر والوظيفه if ( source == اسم الزر ) then -- نتحقق من الزر setElementPosition ( localPlayer, x, y, z ) -- x, y, z بدلها بالمكان الي تبي تنتقل له الأحداثيات end -- اند الأف end ) -- اند الوظيفه وقوس اغلاق الحدث هذا اذا تبيه بزر , واذا تبيه بـ قريد ليست امم طويل بس اذا تبيه بسويه لك بشرط تتعلم من الاكواد ^ ماينفع تنسخ وتلصق
-
ماشوف فيه اي خطأ + تأكد من اسم الزر ادخل فالوكيند بس Httttt7.Ksa وبالنسبه للسكايب تفضل : )
-
#Client Side addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == اسم الزر ) then triggerServerEvent ( "Minigun", localPlayer ) -- ترايقر لسيرفر عشان لايكون السلاح وهمي end end ) #Server Side addEvent( "Minigun", true ) addEventHandler ( "Minigun", root, function ( ) if ( getPlayerMoney ( source ) >= 4000 ) then takePlayerMoney ( source, 4000 ) -- يأخذ منه 4 الاف سعر السلاح giveWeapon ( source , 38, 10000 ) -- العشر الاف الرصاص الي يجي بالسلاح والـ38 ايدي السلاح setPedWeaponSlot ( source, getSlotFromWeapon ( 38 ) ) -- ايدي السلاح outputChatBox ( "* " .. getPlayerName ( source ) .. " Has Bought Weapon [ Minigun ]", root, 255, 255, 255, true )-- مخرج شات else outputChatBox ( "* You don't have $4000 to buy [ Minigun ]", source, 255, 255, 255, true )-- مخرج شات end end )
