Leaderboard
Popular Content
Showing content with the highest reputation on 02/07/17 in Posts
-
الحمدلله كودك سلطة مو عجين -- اقصد بعض الاشخاص فيها : ) بنسبة للكود سويت لك اياه بالكامل بما اني فاضي ذ + مع الشرح local Grid = gridlist -- اسم الجريد ليست حقك local Button = button -- اسم الزر الخاص بك local Camera = { } -- ننشئ جدول function Loob ( ) -- ننشئ وظيفة بأسم ( Loob ) guiGridListClear ( Grid ) -- نمسح الجريد ليست ونجعله فارغ for i, v in ipairs ( Camera ) do -- نلف أو ندور او نمر بجميع قيم الجدول Camera local row = guiGridListAddRow ( Grid ) -- نضيف خانة في الجريد ليست guiGridListSetItemText ( Grid, row, 1, "- Camera "..i, false, false ) -- ونضع اسماً للخانة وهو Camera 1 , Camera 2 -- بحسب عدد الخانات الموجودة بالجدول guiGridListSetItemData ( Grid, row, 1, { v[1],v[2],v[3] } ) -- نضع الداتا على الخانة وفيها الاحداثيات end -- اغلاق لل لفة او المرور بجميع القيم end -- اغلاق الوظيفة addEventHandler ( "onClientGUIClick", root, -- أنشاء حدث بأسم عند ضغط على جيو function ( ) -- نضع وظيفة if source == Button then -- نسوي تحقق اذا كان الشيء المضغوط عليه هو الزر local x,y,z = getElementPosition ( localPlayer ) -- نجلب احداثيات اللاعب table.insert ( Camera, { x, y, z } ) -- ونضيفها للجدول Loob ( ) -- ونستدعي الوظيفة end -- ونغلق التحقق end -- والحدث ) -- ونغلق بالقوس الحدث addEventHandler ( "onClientGUIDoubleClick", root, -- أنشاء حدث بأسم عند ضغط مرتان على الجيو function ( ) -- نضع وظيفة if source == Grid then -- نسوي تحقق اذا كان الشيء المضغوط عليه هو الجريد ليست if guiGridListGetSelectedItem ( Grid ) ~= -1 then -- نتحقق انه حدد على قيمةً ما setCameraMatrix ( unpack( guiGridListGetItemData ( Grid, guiGridListGetSelectedItem ( Grid ), 1 ) ) ) -- نضع الكاميرا ونوجها حول المكان الذي اختاره من القائمة او الجريد ليست else -- اذا لم يحدد على أي قيمة setCameraTarget ( localPlayer ) -- سوف ترجع الكاميرا على طبيعتها end -- اغلاق للتحقق end -- أغلاق للتحقق end -- أغلاق للوظيفة ) -- ونغلق بالقوس الحدث3 points
-
Then you shouldn't be posting it here. We are not a service you know... We help people to learn scripting. If you aren't here for that, then unfortunately you are at the wrong section or even forum. Contact the owner of the resource or learn lua by yourself, those are the two options you have, make them count. I wish you the best of luck!2 points
-
10 فودافون بتضيع فلوسك على فاضي لو كنت مصري لانو في ناس تحولها بايبال 0.35 دولار يمكن وبايبال تاخد رسوم بيوصل 0 هههههه2 points
-
Have you ever experienced the awkward moment when you had to check your large map to see which direction you have to go? This resource lets you make important blips visible on players' screen, something you would see in games like Watch Dogs or Assassin's Creed. The only thing you have to do is set a "blip.visibleOnScreen" element data to true for a blip you would like to make visible, and the blip will be always on your screen, aiming towards the position of the blip. Check the examples given in the script. This DOES work on every resolution, blips won't go out of screen, so no need to be afraid or edit because of that. You can see the distance between the blip and you under the blip image as well. Edit this resource however you want, all I ask for is to leave the credits for me. (I used different blip images from my radar resource on the pictures, feel free to change them.) QUICK UPDATE: Made the distance numbers more easy to read by adding convertNumber function - before: 3328 | after: 3,328 Video preview (sorry for the bad video quality, I don't know why it is that bad): Screens: Changelog: UPDATE (1.0.1): - Made the distance numbers more easy to read by adding convertNumber function - before: 3328 | after: 3,328 UPDATE (1.0.2): - Removed leftover unnecessary lines from the script that I needed for debug used for my radar UPDATE (1.0.3): - Added possibility to disable backgrounds with a variable - Disabled distance check on the Z axis, since this is a 2D display - textOffset works automatically now (you don't have to change that if you disable the background or change the image/background sizes) UPDATE (1.0.4): - Fixed a typo UPDATE (1.0.5): -Fixed typos -Improved fading (not sketchy anymore, fades perfectly and smooth) -Removed unnecessary lines Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=145311 point
-
Hello, We, the eXo-Reallife team, would like to release a module that is also used on our server. It is a pathfinding module developed by Jusonex and StiviK. The module uses the A * algorithm. (https://en.wikipedia.org/wiki/A*_search_algorithm) We use this for our GPS: Why did we develop a module for this and did not simply write a script? This has a very simple reason. The module calculates the routes in your own threads, which has the advantage that it is much faster than a script, and secondly, you can calculate how much routes as you want side by side. This will not cause any lags etc.! What are the features of the module? The module can load several graphs / nodes side by side The module calculates the routes in its own threads Very useful API functions (such as findNodeAt or getNodeNeighbors) What are the main features? int loadPathGraph (String pathToGraphFile) This function loads the graph from the given file and returns a GraphId which you need for all other functions. If something does not work, false is returned. bool findShortestPathBetween (int graphId, float startX, float startY, float startZ, float endX, float endY, float endZ, function callback) This function finds the shortest route between the points. (Unfortunately, no vectors can be handed over!) The callback function is called when the calculation is finished. As an argument, either a table is returned that contains all nodes, or false if no route is found. bool unloadPathGraph (int graphId) You can use this function if you no longer need and want to unload the graph, it returns true if everything is fine, false if an error has occurred. You will find all the other functions that are included in our documentation. Why is the eXo team releasing all this? Well, that has the simple reason, we want to share our work with others and not just keep it for us! We hope we can enrich you with it and vlt. Even help! Where can I download the module? The whole module is open-source and can be viewed in our GitHub organization. It's released under the MIT License. GitHub organization: https://github.com/eXo-MTA Repository: https://github.com/eXo-MTA/ml_pathfind Download the module (Windows / Linux): https://github.com/eXo-MTA/ml_pathfind/releases Nodes of all roads in SA: https://github.com/eXo-MTA/ml_pathfind/blob/master/test/sa_nodes.json If you find any mistakes or suggestions, you can simply create a new issue and we will look into it. So now that's it, have fun with the module! - StiviK and the eXo-Reallife team (Original thread in German: https://www.mta-sa.org/thread/36365-release-mta-sa-pathfinding-module/?postID=407938#post407938)1 point
-
سلام عليكم ورحمة الله انا الحين شغال على يوزر بانل تقدر تقول زي لوحة تحكم وتشتري فيها تزبط كم حاجة لوحتي فيها شراء مابات -تزبيط السيارات - الإعدادات-لوحة خاصة للمتبرعين وصورت لكم كم حاجة خلصتها يا ريت تقيمون اليوزر بانل وتعطون عليها ثمن ^^ في أمان الله1 point
-
كفووووووو يا اخ نايف كفوووووووووووو ياااا شنببب اشكرك بجد المود اتشتغل ميه ميه شكراا1 point
-
يا آلهي وش ذا التعليق تو ما نور المكان بوجودكم يا رجل ما قعدت عليها غير يمكن نص ساعة وهذا اللي طلع معي يا ريت أوصل لـ 10 % من اللي وصلته انت ما شاء الله قال تعديتك قال انا الحين أجرب قدراتي القصوى مسوي فراري ههههههههههههه~ أهنيك على حشيشك الفخم ودي اعرف من وين نشتريه هههههههه تسلم على المرور // Update سويت شوب السيارات شكلي خربتها بزيادة ولا كيف ؟1 point
-
1 point
-
1 point
-
loadstring( "outputDebugString( 1 )" )(); loadstring возвращает функцию и строку ошибки (если есть). Функцию вы должны вызвать сами. На примере показ вызов функции сразу.1 point
-
1 point
-
@iMr.WiFi..! لو انك معدل اخطائي افضل بكثير من انك تعطيني جاهز , عموما يعطيك العافية حبيبي1 point
-
1 point
-
1 point
-
addEventHandler("onPlayerWasted", root, function() if getTeamName( getPlayerTeam(source) ) == "Taxi" then setPlayerTeam ( source, nil ) end end )1 point
-
"onClientGUIClick" getElementPosition table.insert -- the position -- then refresh the grid list by loob1 point
-
يبدو انك تطورت ي تلميذي لقد حطمت التوقعات متمني لك التوفيق والنجاح , نغير التروس .. ما شاء الله شذا الجمال كم قاعد عليها اتوقع كثير من الوقت علعموم شيء جبار نزل منك وبتوفيق لك <3 بنسبة للتقيم 10/10 عشان اقول الصراحة اتوقع انك تعديتني من ناحية البرمجة ذذ ._.1 point
-
cameraTable = { {x,y,z,rx,ry,rz}, -- احداثيات الكاميرا {x2,y2,z2,rx2,ry2,rz2}, ... } -- لوب للجدول guiGridListSetItemData "onClientDoubleClick" guiGridListGetItemData setCameraMatrix1 point
-
Was asked recently on Discord, MTA:SA staff said they don't have enough developers for a project as big as that. In addition to that I think that there are more than enough of GTA:V Multiplayer mods running atm for MTA:SA team to even bother making their own.1 point
-
1 point
-
addCommandHandler ( 'camera' , function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) ; showCursor ( guiGetVisible ( wnd ) ) ; guiGridListClear ( GridList ) ; for index , values in ipairs ( getElementsByType ( 'marker' ) ) do local newRow = guiGridListAddRow ( GridList ) ; guiGridListSetItemText ( GridList , newRow , 1 , 'Marker #'..tostring(index) , false , false ) guiGridListSetItemData ( GridList , newRow , 1 , { Element = values } ); end end ); addEventHandler ( 'onClientGUIClick' , resourceRoot , function ( ) if ( source == Cm ) then local aSelected = guiGridListGetSelectedItem ( GridList ) ; if ( aSelected ~= -1 ) then local aElement = guiGridListGetItemData ( GridList , aSelected , 1 ) [ 'Element' ] ; if ( isElement ( aElement ) ) then destroyElement ( aElement ) ; end end end end ); ماعليش نسيت اكمل الكود1 point
-
addCommandHandler ( 'camera' , function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) ; showCursor ( guiGetVisible ( wnd ) ) ; for index , values in ipairs ( getElementsByType ( 'marker' ) ) do local newRow = guiGridListAddRow ( GridList ) ; guiGridListSetItemText ( GridList , newRow , 1 , 'Marker #'..tostring(index) , false , false ) guiGridListSetItemData ( GridList , newRow , 1 , { Element = values } ); end end ); addEventHandler ( 'onClientGUIClick' , resourceRoot , function ( ) if ( source == Cm ) then local aSelected = guiGridListGetSelectedItem ( GridList ) ; if ( aSelected ~= -1 ) then local aElement = guiGridListGetItemData ( GridList , aSelected , 1 ) [ 'Element' ] ; if ( isElement ( aElement ) ) then destroyElement ( aElement ) ; end end end end );1 point
-
1 point
-
You must add all peds into table to work for all peds in shops table local shops = { {name="Clucking Bell", px=368.11337, py=-4.49257, pz=1001.85156, mx=368.12790, my=-6.02016, mz=1001.85156, dim=5, int=9, skin=167, rot=180}, } local peds = {} function ped () for index, shop in pairs(shops) do local ped = createPed(shop.skin, shop.px, shop.py, shop.pz) peds[ped] = true setElementInterior(ped, shop.int) setElementDimension(ped, shop.dim) setPedRotation(ped, shop.rot) setElementFrozen(ped, true) setElementData(ped,"shopPed",true) end end addEventHandler ( "onResourceStart", root , ped ) function onPlayerTarget ( targetElem ) if peds[targetElem] then setPedAnimation ( targetElem, "ped", "handsup",-1, false, false, false, true) setTimer(givePlayerMoney, 5000, 1, source, math.random(1000, 2000)) -- 5000ms = 5 seconds end end addEventHandler ( "onPlayerTarget", getRootElement(), onPlayerTarget )1 point
-
1 point
-
wrappers = sandboxes السايند بوكس هو مجرد نظام يعزل عن النظام الاساسي مثلا في الايفون مستحيل يكون تطبيق متصل بتطبيق ثاني الا بصلاحيات وهو كذا فالام تي اي استخدامه لو تبي تسوي ميزات اكثر للمودات مثلا في المولتي قيم تفصل القيمات عن بعض وبرضوا مفيد للحماية وتطوير البرمجة تخليها اسهل فالمتعلق بسؤالك وش علاقة اللود سترنق مع السايند بوكس بهذا الكود انك local f = loadstring("print('Hello')") -- loadstring نقوم بتشغيل الكود من سترنق عن طريق setfenv(f, {}) -- print, ipairs, math.random, etc.. نقوم باعطاء الكود بيئة فاضية اي لايوجد قيم بالبيئة اي لايمكن استدعاء بعض المتغيرات مثل pcall(f) --غير موجودةprint يقوم باعطائنا خطأ ان الوظيفة -- يمكنك تعبئة الجدول بالوظائف التي تريدها فقط ويمكنك صنع وظائف الخاصة بالبيئة والتحكم بها وحمايتها1 point
-
In addition to what @koragg said, the issue is that when you first call onReceivedData you are adding the render function to the onClientRender event. You'll need to grab a hold of that render function (your render function atm is being defined globally), and execute removeEventHandler if the render function already exists. You need to do these three things: Before function drawReceivedData(...) write this line: local render; This will set the scope of the render variable Right after the function drawReceivedData(...) line, check if render exists (if not nil), and it does, run this: removeEventHandler("onClientRender", root, render) Steps to improve general code: Lift the state: make the render function a regular function (not one defined inside another function) Make it refer to a safeStatus table onReceivedData check if safeStatus is defined. If it isn't (is nil), define it, and add the event. It is already defined, redefine it (or just update fields) so the render function will print the updated fields. Good luck!1 point
-
1 point
-
السلام عليكم ورحمة الله وبركاته من غير ما اطول عليكم اليوم جبتلكم كود مرغوب طبعا هو مشترك ما بين سيرفر وكلينت تمام وش وظيفة الفنكشن الفنكشن يعطل اي فنكشن مضاف للماركر وانت مار عليه بجيت باك من فوق مثلا كيف يعني ما فهمت شوف يقلبي يعني انت مسوي ماركر ومسوي لوحة بغيت اول ما يلمس الماركر يفتح اللوحه تمام لكن في مشكله لو انت سويت ماركر من نوع cylinder وجيت تمر من فوق الماركر بتصير اللوحه تفتح وبكذا بيكون عندك مشكله افرض انت مسوي ماركرين فوق بعض بتصير مشكله لو انت مسوي الماركرين يفتحو لوحتين راح تفتح اللوحتين فوظيفة ذا الفنكشن تلغي الارتفاع الزائد يعني ما تفعل الكلام ذا فقط ارتفاع 2 زياده فوق ارتفاع الماركر اللي بتفتح له تمام نشوف طولت عليكم اسف نجي نشوف السورس كود function disableMarkerHitHighet(themarker,evname,tt) if getElementType(themarker)=='marker' and type(evname)=='string' then local x,y,z=getElementPosition(themarker) local ta={} if #getEventHandlers( evname, themarker )==0 then return end for k,v in ipairs(getEventHandlers( evname, themarker ))do removeEventHandler(evname, themarker, v) table.insert(ta,v) end if tt then addEventHandler(evname,themarker,function(plr,dim) if dim then local xp,yp,zp=getElementPosition(plr) if zp<=z+2 then for k,v in ipairs(ta)do v(plr,dim) end end end end) else addEventHandler(evname,themarker,function(plr) local xp,yp,zp=getElementPosition(plr) if zp<=z+2 then for k,v in ipairs(ta)do v(plr) end end end) end end end نجي للارقمنتات الحين وطريقة الاستخدام disableMarkerHitHighet(element marker,string event,bolean state) طيب بسم الله marker:الماركر اللي تبي تنفذ عليه الوظيفه او الخاصيه ذي event:اسم الايفينت وهو يمكن ان يكون 4 اولا بالكلنت سايد onClientMarkerHit onClientMarkerLeave ------------------------سيرفر سايد onMarkerHit onMarkerLeave -----------------ارقمنت اختياري state:يمكن ان تكون قيمتين true----لو في نفس العالم false-----لو مو في نفس العالم وتقدر تخليها ما منها فاظيه هي القيمه اصلا false طيب state هذي تحقق لو الالمنت اللي لمس الماركر او تركه في نفس العالم اللي فيه الماركر ملااااااااحظه مهمة الخاصية بتزبط لو انت مسوي الحدث حق الماركر كالاتي مثلا m1 = createMarker ( 2487.7041015625, -1665.9248046875, 12.34375, "cylinder", 1.5, 215, 215, 255 ) addEventHandler('onClientMarkerHit',m1,function ( hitPlayer ) if ( hitPlayer == localPlayer ) then if ( source == m1 ) then guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end end end ) disableMarkerHitHighet(m1,'onClientMarkerHit') اما كذا فما بتزبط m1 = createMarker ( 2487.7041015625, -1665.9248046875, 12.34375, "cylinder", 1.5, 215, 215, 255 ) addEventHandler('onClientMarkerHit',root,function ( hitPlayer ) if source==m1 then if ( hitPlayer == localPlayer ) then if ( source == m1 ) then guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end end end end ) disableMarkerHitHighet(m1,'onClientMarkerHit') وفي الختام اتمنى اكون افدتكم ويكون مفيد للجميع بالتوفيق للجميع1 point
-
1 point
-
9/10 الخلفية مساحة كبيرة و فراغ علي الفاضي اقتراح تعمليها تطلع من تحت لفوق تكون افضل و تكون حزء من الشاشة بس لاكن كــ تصميم و شكل ايكونات رائع1 point
-
تجيبهم من الكاش ؟ هههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه1 point
-
1 point
-
- Minor update (Major update coming soon) Added PVP based island (Slightly remastered death island from Halo 1) tell yeh the truth it ain't scripted in at all; but aye it works. I'll be adding a completely custom weapon system in soon enough, so I'll add stuff like events so you can join a death match event and you'll be able to choose load-outs n stuff. With a lot of weapons to choose from.1 point
-
1 point
-
حاليا قيد التطوير النظام الاساسي بالسيرفر والشات الخاص والاحداث الجماعية والمجموعات صورة للشات الخاص1 point
-
@iMr.WiFi..! وظيفة رائعة وعجبتني لكن بدل سطر 7 بهذا table.insert(Accounts,Account)1 point
-
Hey guys, I'm going to show you my own Mother Base map! It's perfect for factions, gangs or squads! The location is just west of Bayside Marina and Gant Bridge. Here are few screenshot for you guys: The main building The quarters The back of the mail building Sorry, I can't attach my pictures so I'm giving you the links to the pic. And here's the download link: MGS:V Inspired Mother Base Thanks for visiting this very first thread of mine, I hope you enjoy my present! And I'm sorry if there's any errors in the map, I used to put the map in a RPG server so there are vehicles I put. I'm a new mapper so this is one of my biggest map I made.1 point
-
@#Soking سطر 80 راح يعطي الاعب بفلوس بكثر مافيه لاعبين بالمهمة , سطر 50 مفروض تتحقق ان السيارة ماهي موجود نفترض ان صار فيه بق وحاول تحسن طريقة كلامك مع الناس انا جاي افيدك فـ خلك محترم1 point
-
1 point
-
@#Soking عندك فنكشن isPlayerInMisson لو كان عندك 3. او 4 لاعبين كودك راح يتحقق من اول لاعب اذا ماكان بالتيبل راح يوقف الوظيفة ويرجع لك بـ فولس وبعد ناقصك تحققات وفيه اخطاء وبالنسبة لـ صاحب الموضوع اذا الطريقة الي عطيتك اياها قبل صعبة في اسهل منها خلي جدول الاحداثيات بالشكل هذا local Pos = { [ 1 ] = { x = 5 , y = 8 , z = 8 } , [ 2 ] = { x = 1 , y = 4 , z = 0 } , } وسوي متغير وقيمته 0 يكون بالسيرفر طبعا وكل ما لاعب يدخل الماركر يزود قيمة المتغير واستدعي القيمة من الجدول بالشكل التالي aNum = aNum + 1 x = Pos [ aNum ].x -- Ex وكمل ع الباقي1 point
-
1 point
-
1 point
-
1 point
-
خلي جدول الاحداثيات بالشكل هذا local Pos = { { aState = true , x = 0 , y = 0 , z = 0 } , { aState = true , x = 5 , y = 8 , z = 8 } , } طبعا كـ مثال واذا الاعب دخل المهمة سوي لوب وتحقق ان القيمة الاولى بالتيبل ماتساوي فولس وححطه بالاحداثيات وحط القيمة الاول بالتيبل يساوي ففولس واذا المهمة انتهت سوي لوب من جديد وخلي القيمة الاول بالتيبل كله يساوي ترو1 point
-
كيف تجيب الداخلين بالمهمة ؟ وكيف تقتلهم ؟ عشان كذا التيبلات لازم بكل مهمة , لو تبيها بدون اخطاء طبعا وشي راجع لك1 point
-
1 point
