Jump to content

jafar

Members
  • Posts

    1,434
  • Joined

  • Last visited

Everything posted by jafar

  1. خل الرقم امام اسم الصورة
  2. استخدم تيبل مثلا CarUpgrade = { 1, 2 , 3 }; استبدل الأرقام حسب الا تبي تحذفهم او استخدم اللوب for i = 1, 3 do end هذا الكود بيحذفهم من 1 الى 3
  3. اذا مو مسوي جدول , احذف النقطة
  4. هريسة آيش آلله يصلحك آنآ خليته آذآ ضغط 8 تنخفي السيآرة وتجي وحدهـ جديدة بجوآرهـ آذآ كآن يبغى زي مآتقول فيسير كذآ Vehicle = {} function CreateVehicle(Player) if isElement( Vehicle[Player] ) then return end -- نتحقق إذآ آلسيآرة موجودة ونسحبهآ local = x, y, z = getElementPosition ( Player ) -- جلب إحدآثيآت آللآعب لإنشآء آلسيآرة بجآنبه Vehicle[Player] = createVehicle ( 411, x+4, y+4, z ) -- إنشآء آلسيآرة outputChatBox ( "تم إنشآء آلسيآرة", Player, 255, 0 , 0, true) -- نخرج رسآلة آنه تم إنشآء آلسيآرة end -- نهآية آلوظيفة addEventHandler( "onPlayerJoin", root, function() -- وظيفه باسم + الحدث bindKey( source, "8", "down", CreateVehicle ) -- نفتح آلزر آول مآيدخل آللآعب end) -- نهآية آلوظيفة + إغلاق الإيفنت addEventHandler("onPlayerQuit", root, function() -- حدث عند خروج الاعب + وظيفه باسم destroyElement( Vehicle[source] ) -- نزيل آلسيآرة عند خروج اللآعب end) -- نهآية آلوظيفة + إغلآق آلإفنت كودك ناقصه اشياء كثير ... -- Server Side # local Vehicle = {} function CreateVehicle(Player) if isElement( Vehicle[Player] ) then return end local x, y, z = getElementPosition ( Player ) Vehicle[Player] = createVehicle ( 411, x+4, y+4, z ) outputChatBox ( 'تم إنشآء آلسيآرة', Player, 255, 0 , 0, true) end for k,v in ipairs ( getElementsByType ( 'player' ) ) do bindKey( v, '8', 'down', CreateVehicle ) end addEventHandler( 'onPlayerJoin', root,function() bindKey( source, '8', 'down', CreateVehicle ) end ) addEventHandler ( 'onVehicleExplode', resourceRoot, function () destroyElement ( Vehicle[source] ) end ) addEventHandler('onPlayerQuit', root, function() if isElement ( Vehicle[source] ) then destroyElement( Vehicle[source] ) Vehicle[source] = nil end end) عندك خطأ ف ايفينت onVehicleExplode السورس السيارة مو اللاعب
  5. ناقصك تحقق + فيه طريقة أسهل addEventHandler ( "onPlayerChat", root, function ( text, type ) if type == 0 then if isASCII ( text ) == false then outputChatBox ( "Press M to Talk Your Language! | اضغط م للكتابه بلغتك", source, 255, 0, 0, true ); cancelEvent ( ); end end end ); isASCII = function ( text ) for i = 1, #text do local byte = text:byte ( i ); if byte < 32 or byte > 126 then return false; end end return true; end
  6. استبدل onDXButtonClick الى onClientDXClick
  7. صحيح .. مابتحتاج PHP إطلاقاً بتحتاج قواعد بيانات + اتصالات
  8. سالفتك طويلة وعريضة .. تحتاج فيها الى اتصالات والخ ..
  9. ماينفع تحط الاحداثيات لان الاوبجكت بروح آخر الخريطة .. تقدر تتحكم ف المسافة عن طريق تسلسل الأرقام الرقم الافتراضي 0
  10. صح بينزل الملف , بس طريقتي من ينزل الملف على طول راح تنحذف أكواد الملف الأصلية انت جربها وأحكم بنفسك أحتمالية نجاح الطريقة 90 %
  11. أكيد فيه طريقة .. *فقط للإصدار 1.4 *تقدر تضيف مواتر إلى الجدول عشان تصير لها حماية * لازم تكون الملفات في المود إلي فيه الكود نفسه *فقط لملفات txd - dff نفترض إن الملفات الي ماتبي أحد يزرفه يحمل إسم 433.txd - 433.dff تروح الميتا وتسوي كذا: "443.dff" download="false" /> "443.txd" download="false" /> بعدها تروح داخل الملف, وتستبدل أكواد الإستبدال بـ filePath = { { "443.txd", 443 }; { "443.dff", 443 }; -- { "filePath", ID }; }; modelID = { }; function checkTransfer ( ) if isTransferBoxActive ( ) == true then setTimer ( checkTransfer, 1000, 1 ); else for i, v in ipairs ( filePath ) do local file, ID = v [ 1 ], v [ 2 ]; if not modelID [ file ] then downloadFile ( file ); modelID [ file ] = ID; end end end end addEventHandler ( "onClientResourceStart", resourceRoot, checkTransfer ); addEventHandler ( "onClientFileDownloadComplete", resourceRoot, function ( file, success ) if success then local ID = modelID [ file ]; if ID then if string.find ( file, ".txd" ) then txd = engineLoadTXD ( file ); engineImportTXD ( txd, ID ); end if string.find ( file, ".dff" ) then dff = engineLoadDFF ( file, ID ); engineReplaceModel ( dff, ID ); end modelID [ file ] = nil; local resourceName = getResourceName ( getThisResource ( ) ); local file_ = fileCreate ( ":" .. resourceName .. "/" .. file ); if file_ then fileWrite ( file_, "This Private File .." ); fileClose ( file_ ); end end end end );
  12. لا , اذا حطيتها ف أرقمنت اختياري ماراح تسبب أخطاء.
  13. الفكرة حلوة , لكن ليش By Fox? معظم الأكواد عاطينهم لك الشباب -.-
  14. تقدر تعدلها مباشرة من الوظايف او تسويها بـ setElementData getElementData setPlayerTeam
  15. لا , الكود سهل جداً لأنك راح تضيف سطر واحد وهو التحقق .. وآسف أنا كنت غلطان بأسماء الملفات فوق , لأن الفنكشنات الموجودة فيه صارت في ملف ثاني -.- عموماً .. روح لملف admin/client/gui/admin_inputbox.lua سطر 265 وظيفة aBanInputBoxFinish واستبدله بالكود هذا : function aBanInputBoxFinish () -- Get options local bUseIP = guiRadioButtonGetSelected( aBanInputRadio1A ) local bUseSerial = guiRadioButtonGetSelected( aBanInputRadio1B ) -- Get duration local seconds = false for i,dur in ipairs(aBanDurations) do if guiRadioButtonGetSelected( aBanInputRadio2s[i] ) then if guiGetText(aBanInputRadio2s[i]) == "Custom:" then if guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Mins" then seconds = guiGetText(customDuration) * 60 elseif guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Hours" then seconds = guiGetText(customDuration) * 3600 elseif guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Days" then seconds = guiGetText(customDuration) * 86400 end else seconds = dur end end end -- Get reason local reason = guiGetText ( aBanInputValue ) -- Validate settings if not bUseIP and not bUseSerial then aMessageBox ( "error", "No type selected!" ) return end if seconds == false then aMessageBox ( "error", "No duration selected!" ) return end -- Send ban info to the server if reason == "" then return aMessageBox ( "error", "Please enter the ban reason!" ); end triggerServerEvent ( "aPlayer", localPlayer, aBanInputPlayer, "ban", reason, seconds, bUseSerial ) -- Clear input guiSetText ( aBanInputValue, "" ) for i,dur in ipairs(aBanDurations) do guiRadioButtonSetSelected( aBanInputRadio2s[i], false ) end end وحق الميوت في نفس الملف سطر 431 وظيفة aMuteInputBoxFinish واستبدله بالكود ذا : function aMuteInputBoxFinish () -- Get duration local seconds = false for i,dur in ipairs(aMuteDurations) do if guiRadioButtonGetSelected( aMuteInputRadio2s[i] ) then seconds = dur end end -- Get reason local reason = guiGetText ( aMuteInputValue ) -- Validate settings if seconds == false then aMessageBox ( "error", "No duration selected!" ) return end -- Send mute info to the server if reason == "" then return aMessageBox ( "error", "Please enter the mute reason!" ); end triggerServerEvent ( "aPlayer", localPlayer, aMuteInputPlayer, "mute", reason, seconds ) -- Clear input guiSetText ( aMuteInputValue, "" ) for i,dur in ipairs(aMuteDurations) do guiRadioButtonSetSelected( aMuteInputRadio2s[i], false ) end end
  16. لازم تعدله من الأدمنية .. في ملف admin_server أو admin_main
  17. guiCreateButton addEventHandler -- "onClientGUIClick"
  18. هذا حق الميوت , الباقي عدله من الأدمنية في ملف admin_server أو admin_main addEventHandler ( "onPlayerMute", root, function ( ) if isGuestAccount ( getPlayerAccount ( source ) ) == false then if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Console" ) ) then cancelEvent ( ); end end end );
  19. اول شيء بدأت فيه كنت اعدل على المودات وطبعا التعديل كان ياخذ مني وقت كبير , بعدها بدأت على ما أتذكر بصنع شوب وطبعاً جمعت كم كود وخليتهم هههه بعدها بدأت أتطور وفيه ناس هنا في المنتدى ساعدوني أيضاً ,
×
×
  • Create New...