Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/05/17 in all areas

  1. السلام عليكم ورحمة الله وبركاته بالتوفيق لكم ان شاءالله لكني ماعرفت ولا واحد فيكم مافي غير نايف وكروس فقط الي عرفتهم وانت ياماستر اول مره اشوفك ممكن توريني شيء من برمجتك او شغلك لاهنت ثانيا اذا بتسوي سيرفر مو تجي منتدى وتجمعلك قروب فيه 10 مبرمجين لن صدقني بيجيك وجع راس واجد لنهم بيختلفون عالمودات وانا احسن وانا احسن مثل ماصار بقروب كومينتي العرب الي كان مديره ويزراد والطقه ذي 2 اداره وهم الي معهم الاستضافه 2مبرمجين يكفون وزياده 1مصمم مابات يعتبر بروفيشنال ض1 او التوب و4 اسل مانجر عشان ينظمون السيرفر وصلى الله وبارك عالعموم هذي قناتي عاليوتيوب اذا اعجبك تصميمي لاتستحي تطلب مني https://www.youtube.com/channel/UC-EU1eORo1jcdU8HtKOLSPg بالتوفيق لك
    4 points
  2. I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.
    2 points
  3. To start off with some good news: There is already a pretty detailed compile guide: https://wiki.multitheftauto.com/wiki/Compiling_MTASA Also, we started documenting some parts in the past: https://wiki.multitheftauto.com/wiki/Category:Classes_(Blue) https://wiki.multitheftauto.com/wiki/Coding_guidelines https://wiki.multitheftauto.com/wiki/Coding_info https://wiki.multitheftauto.com/wiki/Category:Development And now the bad news: The cost of documenting everything is too high compared to the resulting benefit. For most things, there are enough examples, i.e. when implementing a Lua function just string-search for an existing Lua function and copy&paste that code. This approach works fine for the most high-level code. In the lower-level modules (especially Game SA and Multiplayer SA) the explained approach doesn't work very well. But to be honest with you: We don't understand some parts of that code either due to its lack of documentation without reverse engineering it again. Documenting at least parts of that stuff is absolutely needed, but as it just works atm, our approach is to don't touch the running system. However, I could imagine documenting some "basic patterns" like "How to implement a Lua function" or general guides like "How to learn reverse engineering for MTA".
    2 points
  4. INTRODUCTION Many of you know MTA:Script Editor and that I've stopped working on it. The main reason was the syntax highlighter has many bugs that annoy me and others. Due to the fact I stopped developing it I decided to find a better solution. At first I wanted to make an extension for Eclipse but I thought that's too much to download for everyone just to script for MTA. Then I wanted to write an extension for Visual Studio but again, too much to download. I heard of Sublime Text which is small in download size but powerful at the same time. So I downloaded it and immediately started researching how to make packages for it. Because I made an application for MTA:SE to fetch all the MTA functions and save them in an SQLite database, I decided to reuse it and generate files for Sublime Text instead. So, this is what I came up with over the weekend. INSTALLATION Make sure you have Sublime Text installed. It works with both, Sublime Text 2 and 3 (thanks Goonz for confirming it works with Sublime Text 2). Download the 50pMTAEditor.zip from the link below. Extract the .zip to C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\50pMTAEditor\ Run Sublime Text 3 and create a new file (File -> New) - this is only necessary so that you can see if it works Select the syntax highlighter (View -> Syntax -> Lua (MTA:SA) ) Select color scheme which has colors of MTA function names. Red for client-side, Orange for server-side and Blue for shared functions (Preferences -> Color Scheme -> User -> 50pMTAEditor -> Monokai-MTA-Edit) And you're ready to edit .lua files and have all MTA functions highlighted and auto-completion too. DOWNLOAD https://dl.dropboxusercontent.com/u/437 ... Editor.zip (only 512 KB) (MD5: CA7EA2AEE682B79BBCA01A34AC39C9FD) KNOWN ISSUES Auto-complete window that shows up when you're typing function names will show both server and client functions because Sublime Text doesn't know which files should be showing which functions. It doesn't matter for many functions because the parameters are the same, but for some functions it does matter, like outputChatBox has "visibleTo" parameter which is not present in client-side variant. In client-side files you will also see server-side functions (eg. getPlayerAccount).
    1 point
  5. السلام عليكم ورحمة الله وبركاته ( المود غير مشفر ,) كيف الحال عسـآكم بخير وبـأفضل صحة معي لكم مود صراحة اول مرة احد يسويه طبعا المود ( اختصارات ) الفكره هي ايش؟ ان اي زائر او اي شخص فـ السيرفر يقدر يضيف الاختصار بنفسه . + فيه فلتر لـ الكلام اللي مو كويس . وفيه زرار حذف اختصار يفتح فقط لـ الكونسول. واي لاعب ما معه كونسول ما راح يشوف الزرار المميزات 1 - لوحة مميزة ومنسقه 2 - حفظ الكلام علي SQL 3 - مود حصري 4 - أكتشف بنفسك لـ تحميل المود : http://up.top4top.net/downloadf-3864ijgw1-zip.html طبعأ آولأ آحب اشــكر أخوي وزميلي ماستر علي مساعدته لي وعلي موافقته اني انشر المود بسم الله نبدأ الصور image free hosting host image online picture uploading
    1 point
  6. السلام عليكم ورحمة الله وبركاته الوظيفة التي معنا هي : اختيار لاعب عشوائي من السيرفر هذه الوظيفة سيرفر فقط ، و الجملة التركيبية هي getRandomPlayer ( ) طبعا بتقولون ليه م في ارقيومنتات ، لانه الوظيفة تقوم باختيار لاعب عشوائي بالسيرفر ! نأخذ مثال بسيط ؛ عند كتابة كوماند يقوم باختيار لاعب عشوائي واعطائه مال addCommandHandler ( "Random" , -- كوماند function ( ) -- وظيفة givePlayerMoney ( getRandomPlayer ( ) , 1000 ) -- اعطائه مال end -- انهاء الوظيفة ) -- اغلاق الكوماند ومع المثا الثاني والآخير في هذا المثال نقوم بوضع اسم لاعب عشوائي في الشات function getPlayer ( ) outputChatBox ( " * "..getPlayerName ( getRandomPlayer ( ) ).." فاز بالسحب العشوائي " , root ) end والسلام عليكم ورحمة الله وبركاته
    1 point
  7. بسم الله الرحمن الرحيم السلام عليكم ورحمة الله تعالى وبركاته لأن أظن أغلب الناس ماتعرفه وتحسبه معقد interpolateBetween جاي أشرح لكم فنكشن تابعو معي يمكن الشرح يكون طويل لكن اتمنى تستفيدو تعني الإقتحام مابين أو التأثير بين بكل بساطة كل ماعليك معرفته هو مثل من - الى الفنكشن يسمح لك تسوي أنيمايشن (حركة) بين 6 نقاط حيث تتمثل الثلاث الأولى من إحداثيات البداية والثلاث الثانية النهاية سواءا كان : لوحة - صورة - تصاميم دي إكس - ماركر - كاميرا .. أي شي له إحداثيات # الجملة التركيبية للوظيفة float float float interpolateBetween ( float x1, float y1, float z1, float x2, float y2, float z2, float fProgress, string strEasingType) : العناصر المطلوبة x1, y2, z2 : (..إحداثيات بداية التأثير ( الحركة x2, y2, z2 : إحداثيات نهاية التأثير fProgress : مدة الإحراز أو التقدم التي يأخذها التأثير ( الوقت ) ويكون نوعا ما ب ميلي ثانية strEasingType : نوع الحركة أو التأثير اللذي تريده الأمثلة رح توضح أكثر أعرف انكم مافهمتو بعد حتى نجيب قيمة ب ميلي سكند أو ميلي ثانية نستخدم getTickCount fProgress الوظيفة تقوم بجلب مدة الوقت اللي جهازك كان شغال فيه بالميلي سكند وببعض حسابات نكون اللي نحطه بالنهاية moveObject أنواع الحركة ... تماما مثل من الويكي https://wiki.multitheftauto.com/wiki/Easing الموقع فيه جدول يوضح لك كل أنواع الحركة وكيف تأثيرها مثال لهذا "Linear" : كيفية تأثيرها يعني بشكل مستقيم دون تأثيرات ثانية بالمثال يتضح المقال # الأمثلة # مثال 1 المثال يوريني كيف نخلي لوحة تجي من فوق الى الوسط sx, sy = guiGetScreenSize() test = guiCreateWindow((sx - 454) / 2, (sy - 502) / 2, 454, 502, "test", false) -- لوحة function pop() local rh = interpolateBetween( (sy - 2) / 2,0,0, (sy - 502) / 2,0,0, (getTickCount()-start)/1800, "OutElastic") -- نعرف قيمة واحدة لأننا نريد الإرتفاع فقط guiSetPosition(test,(sx - 454) / 2,rh, false) -- نخلي موضع اللوحة على حسب اللي نبيه end bindKey("F2", "down", function () guiSetVisible(test,true) addEventHandler("onClientRender",root,pop) -- الفنشكن يستخدم مع الرندر start = getTickCount() -- نعيد تعريف وقتنا حتى يتعرف عليه عند الضغط على الزر end) getTickCount()-start/1800 نعيد نجيب الوقت ننقصه من وقت البداية اللي هو عند الضغط على الزر نقسمه على وقت النهاية اللوحة رح تجي لمدة ثانية و 800 ميلي سكند وليس بعد على الأرجح رح يطلعنا start a nil value لذا نقترح نعرفه مرتين "OutElastic" بهذا الشكل ض2 نقدر نستعمل واحدة او اثنين او ثلاث شرط مايكونو فوق ثلاث لأننا مانحتاجهم نحطهم صفر مثال 2 cam نوضح كيف نسوي كاميرا تتحرك من موضع لاخر عند كتابة الكومند start = getTickCount() addCommandHandler("cam", function() start = getTickCount() addEventHandler("onClientRender",root,moveCam) end) function moveCam() x1, y1, z1 = interpolateBetween(500,600,452,800,454,411,(getTickCount()-start)/4000, "Linear") x2, y2, z2 = interpolateBetween(510,620,512,850,464,471,(getTickCount()-start)/4000, "Linear") setCameraMatrix(x1, y1, z1, x2, y2, z2) end الإحداثيات غير مجربة قاعد أخبص فقط لتوضيع المعنى مثال 3 نوري كيف نلون ليبل (كتابة) عند دخول تأشيرة الماوس إليه start = getTickCount() test = guiCreateWindow(454,503, 454, 502, "test", false) label = guiCreateLabel(100, 0, 252, 20, "testing", false, test) guiLabelSetColor(label, 255, 0, 0,255) -- نحط مثلا لون أحمر function colorTheLabel() color1, color2, color3 = interpolateBetween(255,0,0,0,255,0, (getTickCount()-start)/2000, "Linear") -- نحوله من أحمر الى أخضر لمدة ثانيتين end function RestColor() color4, color5, color6 = interpolateBetween(0,255,0,255,0,0, (getTickCount()-start)/2000, "Linear") -- نحوله من أحمر الى أخضر لمدة ثانيتين end addEventHandler("onClientMouseEnter",label, function() start = getTickCount() removeEventHandler("onClientRender",root,RestColor) addEventHandler("onClientRender",root,colorTheLabel) guiLabelSetColor(label, color1, color2, color3,255) end ) addEventHandler("onClientMouseLeave",label, function() start = getTickCount() removeEventHandler("onClientRender",root,colorTheLabel) addEventHandler("onClientRender",root,RestColor) guiLabelSetColor(label, color4, color5, color6,255) end ) الكتابة رح تتلون من احمر الى أخضر عند دخول الماوس اليه و يتحول من اخضر الى أحمر عند الخروج صفحة الويكي https://wiki.multitheftauto.com/wiki/InterpolateBetween هذا كل شي لقد تعبت أتمنى الشرح يكون واضح أي شي غير مفهوم أو غلط يرجى التعليق لأن بعض الأكواد غير مجربة اللعبة ماسحها الموضوع سيتم إعادة تنسيقه حين رجوع جهازي إلي السلام خير الختام
    1 point
  8. Noone asked for a whole gamemode, I already have a lead developer. This post is made for a 2ndary developer, for smaller systems. Im also learning Lua bit by bit.
    1 point
  9. addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == checkbox ) then local pVehicle = getPedOccupiedVehicle ( localPlayer ) if pVehicle then local checkBox_state = guiCheckBoxGetSelected ( source ) local msg = checkBox_state == true and "* vehicle DamageProof enabled" or "* vehicle DamageProof disabled" setVehicleDamageProof ( pVehicle, checkBox_state ) outputChatBox ( msg ) else outputChatBox ( "* you don't have a car !" ) end end end )
    1 point
  10. I am currently awaiting treatment at the E.R. at San Fierro Medical Center! Support it so that I can get my treatment completed asap!
    1 point
  11. local gs_ArmedVehicles = {[425] = true,[447] = true,[520] = true,[430] = false,[464] = false,[432] = false} function checkNoDMGreen() local playerT = getElementsByType("player") for i, thePlayer in ipairs(playerT) do if getPedOccupiedVehicle(thePlayer) and getPedOccupiedVehicleSeat(thePlayer) == 0 then local noDm = getElementData(thePlayer,"invincible") or getElementData(thePlayer,"green") if gs_ArmedVehicles[getElementModel(getPedOccupiedVehicle(thePlayer))] then if noDm or green then -- check elementData here then usetoggleControl toggleControl(thePlayer, 'vehicle_fire', false) toggleControl(thePlayer, 'vehicle_secondary_fire', false) else toggleControl(thePlayer, 'vehicle_fire', true) toggleControl(thePlayer, 'vehicle_secondary_fire', true) end end end end setTimer(checkNoDMGreen,100,0) I think you want this to happen.
    1 point
  12. +_+ ماله دخل يقلبي ذي طريقه استخدمها عشان افتح النافذه واسكرها برقمها من السيرفر سايد بدال ما اسوي لكل نافذه ايفينت معين +_+
    1 point
  13. شرح رائع .. من شخص رآائع # هذ آلشرح الناس تحتاجة كتير .. # بآلتوفيق #
    1 point
  14. No, you'll have to use executeSQLQuery and then use inspect on it's return value.
    1 point
  15. حبيب قلبي يا عسل واجبي ما اقدر اخليك u r like my brother <3 حبيب قلبي ههههههه تراك مب طالع منها تتعاطى معي
    1 point
  16. Сталкивался с подобной проблемой, решение костыльное но рабочее Вырезал сразу код из своего чата для понимания логики CLIPBOARD = guiCreateEdit(1.1,1.1, 0.0001,0.0001,'',true) guiSetEnabled(CLIPBOARD,false) if key == 'v' and getKeyState('lctrl') then if isTimer(self.clipTimer) then return end guiSetText(CLIPBOARD,'') guiSetEnabled(CLIPBOARD,true) guiBringToFront(CLIPBOARD) self.clipTimer = setTimer(function() self.text = self.text..guiGetText(CLIPBOARD) self.carretIndex = utf8.len(self.text) guiSetText(CLIPBOARD,'') self.clipTimer = false end,50,1) guiSetEnabled(CLIPBOARD,false) return end
    1 point
  17. 1 point
  18. createMarker createBlip outputChatBox addEventHandler -- 'onMarkerHit' givePlayerMoney destroyElement
    1 point
  19. 1 point
  20. @#Soking علمني معنى اليأس @Abu-Solo يجيب الشلل @Abdul KariM قدوتي
    1 point
  21. آآآآآآآآآآآخ قلبي حطمتني بكلماتك العذبة ذي بس : ) @Dr.Marco عطيتني فرصصة ادخل مجال الاستضافات : * , ماتقصر ي ذيب .. @Master_MTA ماقصر معي إبد في أي مود يوم كنت اواجه مشاكل معها @#BrosS ساعدني في اشياء كثيرة الله يوفقه :,, @DABL أختفى من الوجود ( في المنتدى اقصد ) ماقصر بشيء : ) في آشخاص موجودون في القلب ولن يذهبو بتاتاً
    1 point
  22. @Master_MTA دايمآ محشش , دايمآ محشش دايمآ #محشش
    1 point
  23. بالتوفيق لك يا سوكينج ان شاء الله يكون سيرفر من افضل السيرفرات انا غادرت التيم بسبب الدراسةوالاختبارات
    1 point
  24. Find this file: E:\Program files\MTA\GTA-SanAndreas\gta_sa.exe and upload here: https://upload.mtasa.com/ and show the link here
    1 point
  25. Tomorrow I'll write a script to automatically do it (You just need to make sure to save the map as a .map file for this to work)
    1 point
  26. addEventHandler("onPlayerChat",root,function(message) local Pattern = "[mtasa://]?%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?[:%d%d%d%d%d?]?"; -- simple pattern for detecting an IP address; if message:find(Pattern) then -- if the message contains an IP address; cancelEvent(); -- cancel the chat event; local Result,Matches = message:gsub(Pattern,""); -- remove the IPs, no need to ban the player for a simple IP, maybe he wrote it by mistake; outputServerLog("WARNING! - "..tostring(Matches).." IPs detected in chat message \""..message.."\". Removing them."); outputChatBox(Result,root); -- output the new message with no IPs to the chatbox; end end);
    1 point
×
×
  • Create New...