Jump to content

The Killer

Members
  • Posts

    1,336
  • Joined

2 Followers

Details

  • Gang
    Loading...

Recent Profile Visitors

1,367 profile views

The Killer's Achievements

Lil' G

Lil' G (37/54)

8

Reputation

  1. https://wiki.multitheftauto.com/wiki/Element_tree
  2. root = جميع الازرار او اللوحات وغيره بجميع السيرفر resourceRoot = يتحقق فقط من الازرار الي داخل المود وهو الافضل دام الاستعمال داخل المود
  3. ماقلت ما يظبط انا قلت الافضل تحط resourceRoot دام انه في نفس المود الازرار او غيره انت حاط مسافات بين الكتابات ورنا مكان الكتابات الي حاطها انت بالقائمه وكيف حاطها
  4. اول شي حدث 'onResourceStart' source = المود الي اشتغل ماهو تعريف اللاعب ثاني شي طريقتك غلط وما لها اي فايده نهائياً تقولي ليش ؟ انت جالس تجيب جميع اللاعبين اول ما يشتغل المود وتبني عليها متغير واحد يتغير كل مره على سريال لاعب من اللوب وراح ينتهي المتغير بتعريف سريال اخر شخص دخل السيرفر يعني ماراح يسجل لك جميع السريالات على متغير واحد فبذلك طريقتك غلط, نجي للطريقه الصحيحه وهي انك تتحقق من السريال بنفسك بحيث يكون زي كذا local serial = "Serial" addEventHandler ("onResourceStart", resourceRoot, function () for _,v in ipairs (getElementsByType ("player")) do if getPlayerSerial (v) == serial then -- end end end )
  5. هذا لأنك مو معرف وش العنصر المختار وفوق ذا مكرر حدثين ماهم معرفين العناصر فيهم انت حاط بالحدث root بذلك راح يتنفذ ذا اشي على اي لوحه تسوي لها دبل كلك او ازرار .. الخ يفضل دام ان الحدث متعلق بالمود نفسه تستعمل resourceRoot يعني راح يكون كودك بذا الشكل addEventHandler ("onClientGUIDoubleClick", resourceRoot, function () if (source == GUIEditor.gridlist[1]) then local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1) if pl == "الأماكن الرئيسية - 1 " then guiSetVisible (GUIEditor.gridlist[1], false) guiSetVisible (Places, true) end end if (source == Places) then local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1) if pl == " ... " then guiSetVisible (GUIEditor.gridlist[1], true) guiSetVisible (Places, false) end end end )
  6. لا ماتعرفني ولا اعرفك # اقولك رح جرب ولا تتفلسف # زي ماقلت لك فوق روح جربه بنفسك وخل عنك الكلام الزايد ... #
  7. #BrosS الويكي معرف على انه سيرفر سايد اونلي لأخطاء موجوده فيه لاكن يشتغل كلاينت وسيرفر .. وبالكلاينت سايد مافيه ارقمنت اللاعب فقط يعرف ك getPlayerSerial () لو على كذا اجل مودات كثيره خربانه :] وثاني مره انصحك بالتجربه قبل التسرع بالكلام #
  8. function dxDrawImageOnElement(TheElement,Image,distance,height,width,R,G,B,alpha) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local width = width or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawMaterialLine3D(x, y, z+1+height-(distanceBetweenPoints/distance), x, y, z+height, Image, width-(distanceBetweenPoints/distance), tocolor(R or 255, G or 255, B or 255, alpha or 255)) end end end end local aSerials = { ["Serial"] = true, } local tag = dxCreateTexture ("crown.png") addEventHandler ("onClientRender", root, function () if aSerials [getPlayerSerial ()] then dxDrawImageOnElement (localPlayer, tag) end end )
  9. local Marker = { } local Player = { } addEventHandler ("onPlayerDamage", root, function () local hp = getElementHealth (source) if (hp >= 5 and hp <= 10) then setElementFrozen (source, true) setPedAnimation (source, "CRACK", "crckidle1", _, false, _, _, true) local x, y, z = getElementPosition (source) if isElement (Marker [source]) then destroyElement (Marker [source]) Player [Marker [source]] = nil Marker [source] = nil end Marker [source] = createMarker (x, y + 3, z - 1, "cylinder", 2, 255, 255, 255) Player [Marker [source]] = source else if isElement (Marker [source]) then destroyElement (Marker [source]) Player [Marker [source]] = nil Marker [source] = nil end end end ) addEventHandler ("onMarkerHit", resourceRoot, function (hit) if getElementType (hit) == "player" then if not isPedInVehicle (hit) then if Player [source] then local plr = Player [source] if getPlayerMoney (hit) >= 2500 then setPedAnimation (plr, false) setElementFrozen (plr, false) setElementHealth (plr, 100) takePlayerMoney (hit, 2500) destroyElement (Marker [plr]) Marker [plr] = nil Player [source] = nil else outputChatBox ("Error - you don't have enough money.", hit, 255, 0, 0) end end end end end ) function destroyMarker () if isElement (Marker [source]) then destroyElement (Marker [source]) Player [Marker [source]] = nil Marker [source] = nil end end addEventHandler ("onPlayerWasted", root, destroyMarker) addEventHandler ("onPlayerQuit", root, destroyMarker)
  10. الله المستعان # ^,^
  11. تطقطق علينا انت ؟ جربته بمود ثاني و مو ضابط !! اطقطق عليك ؟ خخ رح شف مودك الحين انت الي تطقطق علينا ما ظبط ما ظبط شنسويلك يعني ما ظبط لا بعد تنافخ حلوه ذي خخخ والله خسرت وقتي ع الفاضي شغال عندك انا ؟
  12. جرب سوه في مود لحاله وشف كيف اكيد المشكله من مودك ذا #
  13. وكيف ما ظبط ؟ انا مجربه وظبط معي !
  14. Models = { [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [16] = true, [17] = true, [18] = true, [19] = true, } addEventHandler("onElementModelChange", root, function( oldModel ) if ( getElementType(source) == "player" ) then if Models[getElementModel (source)] then setTimer ( setElementModel, 50, 1, source,oldModel ) end end end )
×
×
  • Create New...