Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 15/07/18 in all areas

  1. Hi there! Time sure flies fast, doesn't it? It has been a while since the last post from us so we would like to give you an update on what has been going on recently with MTA:SA. We have got two highlights for you this time. The community Do you remember our Community website? It has served us well over the years but has also caught some rust in the process. Therefore, we would like to re-visit it and improve your experience with discovering and publishing resources. Our plan is to build a new community website from the ground up using modern technologies, and we would like to hear from you what you would like to see on the new platform. Please respond to this thread with your ideas and suggestions. Technically inclined users can take a look at the first pass of our specification document. Development progress As for the mod itself, we have received many pull requests (patch contributions) on our GitHub from open source contributors lately. One of such contributions is a brand new feature: custom IFP animations support, coming from one of our community members, Saml1er. He managed to get this to work nicely in MTA:SA, while ensuring that our coding standards are met so we could include it without too much hassle. Saml1er even made a video which showcases what this feature is all about. You can find it below: We intend this to be a part of our upcoming 1.5.6 release which we hope will come soon, but you can try it out now by using a nightly build: https://nightly.multitheftauto.com/ Tips for using this can be found on our wiki: https://wiki.multitheftauto.com/wiki/EngineLoadIFP That's all for now. Take care and enjoy the summer! — MTA Team
    14 points
  2. م اقول الا أستح على وجهك
    3 points
  3. Make sure to add the following line to your meta.xml. <oop>true</oop>
    2 points
  4. 2 points
  5. من رائي الخاص من كلام الأخ جنتول , انه بينكم عشره الاثنين , وانا لا اعرف عنكم ولا شي للآمانه بس المفروض مهما كان الموضوع , بما انه بينكم عشره , المفروض الأخ سعد الغامدي , بدون مايفتح موضوع يا انه يجي يكلمك , ويحل الموضوع بينكم ودي او انه , يكلمك ويصارحك , بانه يبتعد عنك او انه مايكلمك , زبدة الكلام , المفروض الموضوع ينحل ودي افضل , من انه يكون موضوع والخخ وانا اقترح , انه الموضوع يتسكر , وينحل باقي الكلام بينكم ودي ويتسكر الموضوع عشان , ماتكبر السالفه والخخ .. وانشاءلله تتصاحلو وترجعون افضل من قبل #
    2 points
  6. زي م قال روك عشان م نبي زيادة مشاركات ع الفاضي
    2 points
  7. DownloadFile وظيفة تحميل ملف مرفوع على الانترنت Syntax : bool DownloadFile ( string Link , string FileName ) Required Arguments Link : رابط الملف المراد تحميله يشترط ان يكون رابط مباشر FileName : اسم الملف عندما يتحمل وتقدر تحط مسار واسم الملف ولازم تحط صيغة الملف استخدام الفنكشن يكون بجهة سيرفر سايد والا مابيشتغل source Code : function DownloadFile ( Link , FileName ) assert ( type ( Link ) == "string" , "Bad Argument At Argument #1 Link Moust String" ) assert ( type ( FileName ) == "string" , "Bad Argument At Argument #1 FileName Moust String" ) fetchRemote( Link , function ( Result ) if Result == "ERROR" then error ( "Can't Calling The Link" ) return false end if fileExists ( FileName ) then error ( "the file is already exists" ) return false end local theFile = fileCreate ( FileName ) if ( not theFile ) then return false end fileWrite ( theFile , Result ) fileClose ( theFile ) return true end ) end ex 1 DownloadFile ( "https://i.imgur.com/gdclMbe.png" , "mtaLogo.png" ) DownloadFile ( "https://i.imgur.com/gdclMbe.png" , ":resourceName/mtaLogo.png" ) ملاحظة : اذا ماحمل معك الملف حاول ترفع الملف الي تبيه على موقع ثاني ويكون مباشر Author : Abdul KariM اتمنى ان الفنكشن اعجبكم , والسلام عليكم
    2 points
  8. addEventHandler + group elements I noticed that some people like to add 10000000000000000 addEventHandlers for each element, while you probably only need 1 addEventHandler. Using ONE addEventHandler on a group of elements? Answer: local group = createElement("groupMyCutePeds") -- Create a custom element and save it in to the variable <group>. -- Create 3 peds. local ped1 = createPed(120, 5540.6654, 1020.55122, 1240.545) local ped2 = createPed(120, 5541.6654, 1021.55122, 1240.545) local ped3 = createPed(120, 5542.6654, 1022.55122, 1240.545) -- Set the parent of the 3 peds. setElementParent(ped1, group) setElementParent(ped2, group) setElementParent(ped3, group) -- Add an addEventHandler and use the <group> as <attachedTo> element. addEventHandler("onPedWasted", group, -- "onPedWasted" = serverside. "onClientPedWasted" = clientside. function () outputChatBox("One of my cute peds just died. ;'( No exceptions!") end) Code is untested, but the method is tested. Syntax for functions in example createElement syntax element createElement ( string elementType, [ string elementID = nil ] ) setElementParent syntax bool setElementParent ( element theElement, element parent ) addEventHandler syntax bool addEventHandler ( string eventName, element attachedTo, function handlerFunction, [ bool getPropagated = true, string priority = "normal" ] ) DO NOT disable getPropagated getPropagated: A boolean representing whether the handler will be triggered if the event was propagated down or up the element tree (starting from the source), and not triggered directly on attachedTo (that is, handlers attached with this argument set to false will only be triggered if source == this). If you disable this, children of the <group> element are not included. Make use of the element tree Element tree For applying addEventHandlers to elements created by the resource: Use: resourceRoot / getResourceRootElement For applying addEventHandlers to elements created by scripts of the resource: Use: getResourceDynamicElementRoot For applying addEventHandlers to elements created by maps of the resource: Use: getResourceMapRootElement I hope your code will be without... print(10^10^10^10) -- Print here: https://www.lua.org/cgi-bin/demo ...addEventHandlers in the future.
    1 point
  9. addEventHandler ( "onPlayerWasted" , root , function ( _ , killer ) if ( killer and isElement ( killer ) and getElementType ( killer ) == "player" and killer ~= source ) then local name = getPlayerName ( source ) local killer = getPlayerName(killer) outputChatBox("#c1c1c1* #ffffff〓 #ff0000[ #ffff00" .. name .. "#ff0000 ]#c1c1c1 Has Been Killed By #ff0000[ #00ffff".. killer .."#ff0000 ] #ffffff〓", root, 255, 0, 0, true) end end )
    1 point
  10. أشوف الموضوع يتقفل أحسن . لو بغيت الصرآحه طلعتوا بموقف يسويه الشخص اللي اصغر من عمركم ألمفروض كبرتوا على الحركآت ذي م قصدي اهانه لكم ولا شي بس المواضيع بينكم أفضل . بس أنت اهنت زورو اللي حاط صورته ههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه أمزح يقلبي بتوفيق لكم قفلوا الموضوع او تفاهموا مع بعض بالخاص لأنكم أكبر من ذا الشي والله يوفقكم ويجزاكم خير
    1 point
  11. Thanks, never thought about this! You got some +rep from me.
    1 point
  12. Thank you for your feedback. All the resources we are providing on our shop will get updated, with new versions being released regularly. In one of the version, we will surely change our GUIs!
    1 point
  13. Use the <> tag please. Enable OOP(Object Orientated Programming) in meta.xml using the <oop>true</oop> tag. Or just use setElementData() instead of :setData(), because using OOP only sometimes makes no sense at all. Or if you want a fairly good looking script then you should use :setRotation() instead of setElementRotation() and use :setFrozen() instead of setElementFrozen()
    1 point
  14. @UAEpro لاحقني بكل مكان اشوفه بمقترحات اليوتيوب وبعدين اشوفه يعيد تغريدة لي
    1 point
  15. local currentMission = 1 local repeatTime = 0 local Missions = { -- resource name , mission name [1] = {"Test1Mission", "Test 1"}, [2] = {"Test2Mission", "Test 2"}, [3] = {"Test3Mission", "Test3"} } addEventHandler("onResourceStart", resourceRoot, function() mresource = getResourceFromName(Missions[currentMission][1]) if mresource and getResourceState(mresource) == "running" then exports[Missions[currentMission][1]]:startTheMission() else currentMission = currentMission + 1 if currentMission > #Missions then currentMission = 1 end mresource = getResourceFromName(Missions[currentMission][1]) if mresource and getResourceState(mresource) == "running" then exports[Missions[currentMission][1]]:startTheMission() else return end end end ) function startNextMission() currentMission = currentMission + 1 if currentMission > #Missions then currentMission = 1 end repeatTime = repeatTime + 1 if repeatTime < #Missions+1 then mresource = getResourceFromName(Missions[currentMission][1]) if mresource and getResourceState(mresource) == "running" then exports[Missions[currentMission][1]]:startTheMission() repeatTime = 0 else return startNextMission() end else return outputDebugString("ERROR - THERE'S NO RUNNING MISSIONS RESOURCE") end end كود سويته لك علي السريع اللفكره انك تسوي مود خاص للتحكم بالمهمات بعدين تروح للمهمات و تضيف فانكشن startTheMission و تسوي لها اكسبوت من مود تحكم المهمات و بعدين في المهمه نفسها سوي لما تخلص المهمه يسوي اكسبورت لمود تحكم المهمات للفاكنشن ذي exports["Missions"]:startNextMission() كدا يعني فهمت ؟
    1 point
  16. I've finally made it! And it wasn't so hard haha. Maybe it's a bit amateurish. function drawNextPage() dxDrawRectangle(x/3, y/3, 500, 450, tocolor(0, 0, 0, 125)) dxDrawRectangle(x/3, y/3, 500, 20, tocolor(0, 0, 0, 125)) end function showFirst() addEventHandler("onClientRender", root, drawNextPage) addEventHandler("onClientClick", getRootElement(), onClickNext) showCursor(true) end function onClickNext(button, state, absoluteX, absoluteY, worldX, worldZ, clickedElement) if (state == "down") then if (absoluteX >= x/1.6) and (absoluteX <= x/1.6 + 100) and (absoluteY >= y/1.4) and (absoluteY <= y/1.4 + 100) then disappearThings() showFirst() end end end
    1 point
  17. @Medwar the first one there DOES set the players stats to max, in San Andreas there is a limit for these skills, if it got current skills and they were 500+ then it worked. The code is there now you need to go and make something so I can get a better of idea of what you are trying to do, for me that set my full stats. Go and look at the wiki, see if you can make it work the way you want it to.
    1 point
  18. 1 point
  19. تساعد بعد ما الراجل انساعد خلاص ؟ ولا تزويد مشاركات ؟
    1 point
  20. New version coming kinda soon kinda not that'll hopefully make map loading alot smoother.
    1 point
  21. Updates, updates & more updates. And of-course don't forget to join our discord at: https://discord.gg/kwJ73GY Or check our forums here! Anyway what's new? Check the spoiler below! Stay tuned for more updates!
    1 point
  22. Once you understand the basics of variables, functions, debugging, tables and loops, the only thing that is your way is your mental model and your creativity. Which is something that has to grow over time. The fastest way to get at an higher level is to know exactly what your code does, which is achieve able by debugging (or lots of reading). So for example this code looks complex: (useless code btw) thisTable = {"randomStuff", [20] = "randomStuff", "randomStuff", [30] = "randomStuff"} function functionName (parameter1, parameter2) local newTable = {} for i=1, 30 do newTable[#newTable + 1] = (parameter1[1] or "nothing here") .. " | " .. math.random(1000) .. " | " .. parameter2 end return newTable end local result = functionName (thisTable, "text") Adding debug lines: thisTable = {"randomStuff", [20] = "randomStuff", "randomStuff", [30] = "randomStuff"} iprint("thisTable:", thisTable) -- show table structure function functionName (parameter1, parameter2) iprint("parameter1:", parameter1, ",parameter2:", parameter2) local newTable = {} iprint("newTable:", newTable) local countLoops = 0 for i=1, 30 do iprint('What does >(parameter1[1] or "nothing here")< do? ', (parameter1[1] or "nothing here")) newTable[#newTable + 1] = (parameter1[1] or "nothing here") .. " | " .. math.random(1000) .. " | " .. parameter2 countLoops = countLoops + 1 end iprint("Loop has executed:", countLoops, "times.") return newTable end iprint("functionName:", functionName, ", type value:", type(functionName)) local result = functionName (thisTable, "text") iprint(result) -- show end result But after debugging: (You have to do that yourself, post result please. Which is automatic your motivation towards me.)
    1 point
  23. I am sorry, I do not have time for personal / private coaching. If you start from bottom you have to start with LUA and not with MTA scripting. There are enough basic tutorials around.
    1 point
  24. I think he should use usernames but not serials on this one Yes but username will be a bit harder.
    1 point
  25. لا كبير ولا شي ترا حصلت معي قبل كدا تأمن واحد علي موداتك و يصير خويك و بعدين يخونك و ينشر موداتك و يقول عليها باسمه شي يحرق ويضيع تعبك
    0 points
  26. الله معاك خلك عند الاجانب من عاشر قومًا 40 يوم صار منهم اصلن واضح انك تعرف انجليزي من شفتك كاتب كونيتي
    0 points
×
×
  • Create New...