Jump to content

3NAD

Members
  • Posts

    1,992
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by 3NAD

  1. 3NAD

    help

    Could you tell me, what did you do ?
  2. 3NAD

    help

    I didn't try it. IDs = { 579, 494, 424, 589, 469, 500, 504, 497, 434, 490, 489, 474, 461, 521, 470, 495, 601, 548, 487 } function quitPlayer ( ) for k, vehicle in pairs ( getElementsByType ( "vehicle" ) ) do if IDs [ getElementModel ( vehicle ) ] then if checkEmpty ( vehicle ) then destroyElement ( vehicle ) end end end end addEventHandler ( "onPlayerQuit", root, quitPlayer ) checkEmpty = function ( vehicle ) if #getVehicleOccupants ( vehicle ) == 0 then return true else return false end end
  3. .. تبي تتعلم حيآكـ مآتبي الله يستر علاكـ غلطان اضيع وقتي واكتب الشرح <@>
  4. %اللي عطيتك كان مجرد مثآل لا تعتمد عليه 100 + gui تأكد من المعرفات مثل وتحتاج لـ شرط يظهر النافذة لو كانت مخفية .. أو يخفي النافذة لو كانت ظاهرة guiGetVisible Ex.: if guiGetVisible ( gui ) then -- لو كانت النافذة ظاهرة else -- لو ماتحقق الشرط .. وكانت النافذة مخفية end
  5. لم يتم التجربة addEventHandler ( "onBan", root, function ( theBan ) local isSerialBanned = getBanSerial ( theBan ) if isSerialBanned then if isSerialBanned == "Your Serial" then setTimer ( removeBan_, 1000, 1, theBan ) end end end ) removeBan_ = function ( Banned ) removeBan ( Banned ) end
  6. تحتاج إلى الأكواد هذي guiSetVisible -- إظهار النافذة showCursor -- إظهار الماوس bindKey -- الزر بـ البداية تحتاج إلى إنشاء وظيفة لـ تضع فيهم الأكواد السابقة Ex.: function ShowWindow ( ) end -- ShowWindow = اسم الوظيفة الآن نضع فيها اكواد عرض النافذة function ShowWindow ( ) guiSetVisible ( gui, true ) -- إعتماداً على المعطيات بـ صفحة الكود " بالويكي showCursor ( true ) end -- gui = إسم النافذة -- true = قيمة صحيحة -- false = قيمة خاطئة طبعاً الوظيفة السابقة مالها أي فائدة أبداً ... لأن مافيه شيء يحركها او يفعلها " مثل زر - إيفنت ( حدث ) - كلمة - ... إلخ رآح نستخدم الزر على طلبكـ وهو bindKey اعتماداً على صفحة الويكي للكود يقول bindKey ( key, keyState, handlerFunction ) -- key = الزر -- keyState = حالة الزر وهي عند ضغط الزر او رفع صبعك عن الزر -- handlerFunction = الوظيفة اللي راح نربط الزر فيها النتيجة النهائية function ShowWindow ( ) guiSetVisible ( gui, true ) showCursor ( true ) end bindKey ( "f10", "down", ShowWindow )
  7. المشكلة اثنينكم ملخبطين في تحقيق الشرط .. if isVehicleLocked ( playervehicle ) then -- إذا تحقق الشرط ان السيارة مقفلة setVehicleLocked ( playervehicle, true ) -- يقفلها مرة ثانية ..... حشيش <@>
  8. After start hedit resource. you can use this function ( client side ). importHandling ( vehicle, handlingLine, method ) Ex.: importHandling ( vehicle, "2600 3000 0 0 0.2 -0.7 70 2 2 0.4 5 200000 1000 9.9 4 e 52 0.52 false 30 1.2 0.7 0 0.31 -0.15 0.5 0.3 0.24 0 45000 0 C00000 1 1 1", "SA" ) for more information about this Function: hedit/client/utils.lua
  9. Check this: addEvent ( "onPlayerFinish", true ) function raceWin ( rank ) if rank then if rank ~= 1 then return outputChatBox ( "* Your Rank [ "..rank.." ]", source, 255, 255, 0, true ) end local playername = getPlayerName ( source ) givePlayerMoney ( source, 1000 ) -- money what player get if he finish.(Default=1000) outputChatBox ( "* "..playername.." took $1000 for being the last survivor!", root, 51, 153, 255 ) else outputChatBox ( "* You Don't have any Rank.", source, 255, 0, 0, true ) end end addEventHandler ( "onPlayerFinish", root, raceWin ) If he didn't say anything at ChatBox. The Event isn't added at any resource !!
  10. 3NAD

    Disconnect

    Hmm.. i guess you need to use " disconnect " or " quit " command by this executeCommandHandler Or Use this kickPlayer
  11. viewtopic.php?f=91&t=52883&start=15#p516049 سطر 24 + 25 + 26 فيه طريقة ثانية تختصر الاكواد حق الرابط اللي فوق لو عجزت عن الكود السابق بلغني ..
  12. dx إذا قصدك كتابة forum.multitheftauto.com/viewtopic.php?f=91&t=52883 طبعاً هذا فيه وظايف جاهزة ولكن على ماركر .. ماظن صعبة تغيره لـ شخصية <@>
  13. addEventHandler ( eventName, attachedTo, handlerFunction ) Ex.: function Hit ( ) setElementHealth ( source, 100 ) -- source == attachedTo end -- ]] addEventHandler ( "onClientPlayerDamage", localPlayer, Hit ) -- localPlayer == getLocalPlayer ( )
  14. addEventHandler - Required Arguments -- أرقومنتات مطلوبة eventName -- إسم الإيفنت attachedTo -- ربط الإيفنت مع handlerFunction -- الوظيفة
  15. resourceRoot = getResourceRootElement ( getThisResource( ) )
  16. من باب الإختصار سويت وظيفة خآرجية .. ولا المفروض يكون كذا Marker = createMarker ( ... ) addEventHandler ( "onClientMarkerHit", Marker, function ( player ) if player == localPlayer then local playerTeam = getPlayerTeam ( player ) -- تيم اللاعب local theTeam = getTeamFromName ( "Name Team" ) -- التيم المصرح له بدخول الماركر if not theTeam then return end -- اذا التيم مو متوفر ينهي الوظيفة if not playerTeam then -- إذا اللاعب ماعنده تيم local x, y, z = getElementPosition ( player ) createProjectile ( player, 20, x+30, y+30, z+50, 1, player ) elseif playerTeam ~= theTeam then -- إذا تيم اللاعب مو التيم المصرح local x, y, z = getElementPosition ( player ) createProjectile ( player, 20, x+30, y+30, z+50, 1, player ) elseif playerTeam and playerTeam == theTeam then -- إذا وجد تيم اللاعب وكان تيم اللاعب هو التيم المصرح outputChatBox ( "Welcome", 255, 255, 0, true ) -- إخراج نص end end end , false )
  17. الأصل هي x = إحداثي اللاعب بس زدت عليه 30 لو فرضنا x = 150 النتيجة x = 150 + 30 x = 180
  18. Marker = createMarker ( ... ) addEventHandler ( "onClientMarkerHit", Marker, function ( player ) if player == localPlayer then local playerTeam = getPlayerTeam ( player ) -- تيم اللاعب local theTeam = getTeamFromName ( "Name Team" ) -- التيم المصرح له بدخول الماركر if not theTeam then return end -- اذا التيم مو متوفر ينهي الوظيفة if not playerTeam then -- إذا اللاعب ماعنده تيم startProjectile ( player ) -- يطلق صاروخ elseif playerTeam ~= theTeam then -- إذا تيم اللاعب مو التيم المصرح startProjectile ( player ) -- إطلاق صواريخ elseif playerTeam and playerTeam == theTeam then -- إذا وجد تيم اللاعب وكان تيم اللاعب هو التيم المصرح outputChatBox ( "Welcome", 255, 255, 0, true ) -- إخراج نص end end end , false ) startProjectile = function ( player ) -- وظيفة الصاروخ local x, y, z = getElementPosition ( player ) createProjectile ( player, 20, x+30, y+30, z+50, 1, player ) end وش اللي مافهمته ؟
  19. الوظيفة ذي رآح تبحث في جميع القيم اللي بالجدول بحيث أن كلمة " كلب " موجودة في قيمة لحالها بالجدول .. بشكل أوضح Words = { "كلب", "حمار", }; هنا رآح يبحث في كلمة كلب لحالها وكلمة حمار لحالها , لأن فيه فواصل في نهاية كل قيمة مثل مانت شايف فيه طريقة ثانية اللي هي جلب الكلمة كآملة if msg == "كلب" then ---- end او if Words [ msg ] then ----- end
×
×
  • Create New...