Jump to content

jafar

Members
  • Posts

    1,434
  • Joined

  • Last visited

Everything posted by jafar

  1. لا تعدل شيء في الكود , الكود يسوي حماية لكل القروبات edit : تأكد انه الملف Client
  2. استخدم الوظيفة الخارجية الا حاطنها ف كودي getPedWeapons
  3. الكود خطأ ! مدامك مستخدم return ليه تستخدم else احين صار إذا الي لمس الماركر مو لاعب ينقله -.-'
  4. -- # Server Side ! local marker = createMarker ( ... ); addEventHandler ( "onMarkerHit", marker, function ( plr ) if getElementType ( plr ) == "player" and not isPedInVehicle ( plr ) then if not getPedWeapon ( plr ) then outputChatBox ( "* ليس لديك أي سلاح", plr, 255, 255, 255, true ); else for i, v in ipairs ( getPedWeapons ( plr ) ) do outputChatBox ( "* لديك من الأسلحة " .. getWeaponNameFromID ( v ), plr, 255, 255, 255, true ); end setElementPosition ( plr, x, y, z ); end end end ); getPedWeapons = function ( ped ) local playerWeapons = { }; if ped and isElement ( ped ) and getElementType ( ped ) == "ped" or getElementType ( ped ) == "player" then for i = 0, 12 do if i == 1 then i = 0 end local wep = getPedWeapon ( ped, i ); if wep and wep > 0 then table.insert ( playerWeapons, wep ); end end else return false end return playerWeapons end
  5. قصدك ينقله من مكان لمكان ؟ ولا وش !
  6. -- # Server Side ! local marker = createMarker ( ... ); addEventHandler ( "onMarkerHit", marker, function ( plr ) if getElementType ( plr ) == "player" then if not getPedWeapon ( plr ) then outputChatBox ( "* ليس لديك أي سلاح", plr, 255, 255, 255, true ); else for i, v in ipairs ( getPedWeapons ( plr ) ) do outputChatBox ( "* لديك من الأسلحة " .. getWeaponNameFromID ( v ), plr, 255, 255, 255, true ); end end end end ); getPedWeapons = function ( ped ) local playerWeapons = { }; if ped and isElement ( ped ) and getElementType ( ped ) == "ped" or getElementType ( ped ) == "player" then for i = 0, 12 do if i == 1 then i = 0 end local wep = getPedWeapon ( ped, i ); if wep and wep > 0 then table.insert ( playerWeapons, wep ); end end else return false end return playerWeapons end
  7. هذا قبل كانت عندهم صيانة وأخذو لهم شهر تقريبا, واصلا الشركة صارت كلها مشاكل -.-'
  8. local groupName = 'SWAT' local TeamName = "Medic" local sx, sy = guiGetScreenSize() mainWindow = guiCreateWindow((sx-438)/2, (sy-487)/2, 438, 487, "[MFA] Vehicles", false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 1.00) guiSetVisible(mainWindow, false) mainTab = guiCreateTabPanel(0.02, 0.04, 0.96, 0.90, true, mainWindow) local vehicles = { cars = { tab = guiCreateTab("Cars", mainTab), list = { {"Police Ranger", 599}, {"Police LV", 598}, {"Police SF", 597}, {"FBI Truck", 528}, {"Sultan", 560}, {"Flash", 565}, {"Infernus", 411} } }, bikes = { tab = guiCreateTab("Bikes", mainTab), list = { {"BF-400", 581}, {"FCR-900", 521}, {"NRG-511", 522}, {"PCJ-600", 461}, {"Sanchez", 468} } }, planes = { tab = guiCreateTab("Planes", mainTab), list = { {"Police Maverick", 497}, {"Cargobob", 548}, {"Seasparrow", 447}, {"News Chopper", 488} } } } vehicles.cars.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.cars.tab) table.insert(vehicles.cars, guiGridListAddColumn(vehicles.cars.gridlist, "Cars", 0.9)) vehicles.bikes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.bikes.tab) table.insert(vehicles.bikes, guiGridListAddColumn(vehicles.bikes.gridlist, "Bikes", 0.9)) vehicles.planes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.planes.tab) table.insert(vehicles.planes, guiGridListAddColumn(vehicles.planes.gridlist, "Planes", 0.9)) notice = guiCreateLabel(0.02, 0.94, 0.96, 0.03, "Press (Enter) to select your vehicle>اختر السيارة ثم اضغط انتر", true, mainWindow) guiLabelSetColor(notice, 255, 255, 0) guiLabelSetHorizontalAlign(notice, "center", false) guiLabelSetVerticalAlign(notice, "center") for i,v in pairs(vehicles) do for _,k in ipairs(v.list) do local row = guiGridListAddRow(v.gridlist) guiGridListSetItemText(v.gridlist, row, v[1], k[1], false, false) end end local vehiclesMarker = createColSphere(1217,-1657.1999511719,10.5, 2) createMarker(1217,-1657.1999511719,10.5,"cylinder",2,88,202,52,255) addEventHandler("onClientColShapeHit", vehiclesMarker, function(hitElement) if hitElement == localPlayer and getElementData(hitElement, "Group") == groupName and not isPedInVehicle(hitElement) and getPlayerTeam ( hitElement ) and getPlayerTeam ( hitElement ) == getTeamFromName ( TeamName ) then guiSetVisible(mainWindow, true) showCursor(true) bindKey("enter", "down", selectVehicle) end end,false ) addEventHandler("onClientColShapeLeave", vehiclesMarker, function(leaveElement) if leaveElement == localPlayer and getElementData(leaveElement, "Group") == groupName and not isPedInVehicle(leaveElement) then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) function selectVehicle() for i,v in pairs(vehicles) do local tab = v.tab if guiGetSelectedTab(mainTab) == tab then local gridlist = v.gridlist if guiGridListGetSelectedItem(gridlist) ~= -1 then local row = guiGridListGetSelectedItem(gridlist) local vehName = guiGridListGetItemText(gridlist, row, v[1]) for _,k in ipairs(v.list) do if k[1] == vehName then if i == "planes" then triggerServerEvent("spawningVehicle", localPlayer, k[2], true) else triggerServerEvent("spawningVehicle", localPlayer, k[2], false) end unbindKey("enter", "down", selectVehicle) break end end guiSetVisible(mainWindow, false) showCursor(false) break end end end end سطر 2 استبدله بإسم التيم حقكك
  9. اذا انت مستخدم الكود مرتين, استبدل إسم ترايقر إنشاء السيارة ..
  10. بدل إسم ترايقر إنشاء السيارة اذا بتسوي مقر جديد ..
  11. تم ترجمة https://wiki.multitheftauto.com/wiki/AR ... AttachedTo https://wiki.multitheftauto.com/wiki/AR/getBlipColor https://wiki.multitheftauto.com/wiki/AR/getBlipIcon https://wiki.multitheftauto.com/wiki/AR/getBlipSize https://wiki.multitheftauto.com/wiki/AR/setBlipColor https://wiki.multitheftauto.com/wiki/AR/setBlipIcon https://wiki.multitheftauto.com/wiki/AR/setBlipSize https://wiki.multitheftauto.com/wiki/AR ... leDistance https://wiki.multitheftauto.com/wiki/AR ... leDistance + table.insert table.remove https://wiki.multitheftauto.com/wiki/AR/Table
  12. بختصر لك اذا شفت فنكشن مثل كذا function if do ضيف end -- function end -- لاغلاق if end -- لاغلاق do للمعلومية إند الفنكشن يصصير من تحت
  13. مآ يحتاج , لأن الحدث onPlayerChat فيه برامتر إسمه msg .. فاهم غلط ,, وظيفة الكود هو يبحث عن الكلمة بشكل دقيق مثلا لو استخدمت الكود بدون string.find واللاعب كتب " ابي موتر " ما راح يجيه لكن اذا كتب " موتر " راح يجيه ف اذا استعملها وكتب " ابي موتر " راح يجيه الموتر ^
  14. ما يمديك تحط صورة ف فنكشن outputChatBox -.-' الي عليه يعدل مود الأيقونات وانتهى
  15. اذا بديت من الصفر راح تتعلم كل شيء , أما تبي تتعلم الأشياء الكبيرة مرة وحدة فـ راح تكره البرمجة
  16. و ليه متعبين نفسنا و معربين الويكي و محد خشه !! ياحبيبي ماعربتوه كامل وانا اقصد يعني واحد يسوي موضوع والناس تساهم كثير بس ماتكرر نفس الاكواد والفنكشات الأساسيات معربة =) لو فهمتها راح تعرف تتعامل مع الأكواد
  17. وش هو المكان عالم وهمي ولا انترور ولا منطقة
×
×
  • Create New...