Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 31/08/17 in all areas

  1. تفسير كلامي: dxCreateRenderTarget: أنت مستخدم رندر تارقت dxCreateShader: وشدر dxSetShaderValue(shader, "textureVar", renderTarget): Texture وحاط الرندر تارقت كـ dxSetShaderTransform: ومستخدم هالوظيفة عشان تحدد للشدر دوران ثري دي dxDrawImage: وتستخدم هالوظيفة عشان ترسم الشدر بس أنت مخربط الأكواد، لأن آخر وظيفتين لازم يكونون بحدث onClientRender أو أي حدث مشابه له. الغريب أنك مستخدم dxSetRenderTarget بدون ما ترسم شيء فيه + واضح أنك مغير ترتيب الأسطر بالكود
    2 points
  2. Added: dgsGetDxGUIFromResource dgsGetDxGUINoParent To know the detail. See update log: http://angel.mtaip.cn:233/dgsUpdate/
    2 points
  3. البرمجة فيها ملازمات كثيرة, الشخص اللي عرف كيف يبني الأساس ويحط الحجر بشكل صحيح وعرف كيف يستمر بالبناء فقط هو اللي راح ينجح, من أسس النجاح في هذا المجال, التركيز والصبر والمحاولة, واللغة الإنجليزية لأنها مهمة جدا, قد تخليك اللغة الإنجليزية ماتحتاج تسأل اسئلة من البداية, كل هذا بعد بناء الأسس الصحيحة وإبتداء التعلم بشكل صحيح, الويكي يحتاج انجليزي ويحتاج معرفة أسس البرمجة وماهو المتغير وماهو الثابت وماهو الفنكشن وماهو الحدث, فهم القيم هذي كلها راح يخليك تمشي بطريق البرمجة بدون عراقيل, أتمنى تفهم ويفهم الجميع من كلامي, لأن في كثير اسمهم مبرمجين لاكنهم سالكين طريق خاطيء للبرمجة, طبعا أخطائنا تعلمنا منها لهذا السبب مانبي المبرمجين الجدد والأجيال الجديدة تطيح بنفس الأخطاء, بالتوفيق للجميع.
    2 points
  4. Hello Guys it's me again, As the tittle says today i'm going to explain to you LUA Strings try to follow me till the end. Let's get started , String is a sequence of characters it can be initialized with three forms which includes: Characters between single 'quotes' : Example 'This is The First Text' Characters between double "quotes" : Example "This is The Second Text" Characters between double [[square brackets]] : Example [[This is The Third Text]] An other example for the above three forms are shown below. Text = {} Text[1] = 'MTA SA' -- Single quotes Text[2] = "The Greatest Game" -- Double quotes Text[3] = [[You Will Ever Play]] -- Double square brackets for i=1,#Text do outputChatBox(Text[i]) end --[[Result : MTA SA The Greatest Game You Will Ever Play]] Escape sequence characters are used in string to change the normal interpretation of character. for more information check the list below: Finding Reversing: Formatting strings: Character and byte: Last function: A character class is used to represent a set of characters. examples shown below. If you have any questions, please feel free to ask.
    1 point
  5. السلام عليكم ورحمة الله وبركآته ، شرحنا اليوم عن حفظ / جلب / مسح دآتا الحسآب نبدأ ب أول وظيفة وضع دآتا للحسآب ، setAccountData الجملة التركيبية للوضيفة :- bool setAccountData ( account theAccount, string key, string value ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء الوظيفتين المستخدمات :- isGuestAccount -- التحقق من ان اللاعب بحساب زائر getPlayerAccount -- جلب حسآب الاعب string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' string value :- القيمة ، true / false احيآنا تكون القيمة إسم / واحيانا تكون القيمة رقم ( أمثلة :- ( على كل قيمة مثآل على القيمة true / false عند دخول الماركر نضع له داتا addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", true ) end end end end ) مثآل على القيمة الرقمية في كل مرة يلمس الماركر يزيد على عدد الداتا 1 addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", getAccountData (acc , "DataName") +1 ) end end end end ) مثآل 3 ، مثآل على داتا الأسم ، هذا المثال عبارة انه نكتب شي بالاديت بوكس وينحفظ عن طريق الحساب ! -- Client Side addEventHandler ("onClientGUIClick",root, function () if source == button then local text = guiGetText (editbox) triggerServerEvent ("saveText",localPlayer,text) end end ) -- Server Side addEvent ("saveText",true) addEventHandler ("saveText",root, function ( text ) local acc = getPlayerAccount (source) if not isGuestAccount (acc) setAccountData ( acc , "save", text ) end end ) أما الآن نشرح الوظيفة الثآنية ، وظيفة جلب دآتا الحسآب getAccountData الجملة التركيبية للوظيفة string getAccountData ( account theAccount, string key ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في المثآل الأول سوف نقوم بجلب الداتا في المثال الثاني للوظية عند كتابة كلمة في اف 8 يجلب لنا الداتا الرقمية للاعب addCommandHandler("getPoint", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("Your point in : "..getAccountData(acc, "DataName", player ) end end ) setAccountData في المثال الثاني الآن سوف نجلب الكتآبة التي قام الاعب بكتاباتها في المثال رقم 3 للوظيفة عند كتابة كلمة في اف 8 يجلب الداتا addCommandHandler("getText", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("The text is : "..getAccountData(acc, "save", player) end end ) اما الآن نشرح لكم الوظيفة الثالثة ! وظيفة مسح داتا الحسآب removeAccountData الجملة التركيبية للوظيفة bool removeAccountData ( account , string key ) account :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في هذا المثال سوف نقوم بمسح الداتا الموجودة عند الاعب في المثال 2 للوظيفة addCommandHandler("removedata", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) removeAccountData ( acc , "DataName" ) end end ) والله ولي التوفيق
    1 point
  6. TUTORIAL/GUIDE NO LONGER MAINTAINED This tutorial is no longer maintained and it's contents may be deprecated or no longer work. I created this tutorial in 2014, when I was very involved with MTA and the community around it. Due to the nature of life, I ended up leaving MTA to focus on more important things (work, family, life, etc). I believe this tutorial has helped a lot of people get into scripting for MTA over the years, and I'm happy I was able to do answer questions and help people get into coding! Introduction Hello everyone, and thank you for viewing my introduction for Lua scripting. This tutorial will cover the basics of Lua, but nothing too advanced. This tutorial is highly detailed and should give you a pretty good understanding on how Lua works, even if you have never coded it before. Something to remember is that I do not teach or even talk about using object-oriented programming in this tutorial. Things you'll be learning: For general lua - Variables - Complete - Tables - Complete - Functions - Complete - Return - Complete - Loops - Complete - If/Else/Elseif - Complete - Usage of pre-defined variables Any type of programming - Formatting your code For mta - Create a resource and what is required for one - Complete - Events - Complete - Commands - Complete - Exports & how to call one - Complete So, now that you know what you're going to be learning about, let's get started! Variables Tables Functions Working with return inside functions Loops If/Else/Elseif Usage of pre-defined variables __________________________________________________________________________________________________ Formatting your code __________________________________________________________________________________________________ Making a resource Introduction to events Commands Exports Good luck with your Lua scripting career, I hope that this tutorial has helped you!
    1 point
  7. خليت تركيزي على كودك وقريت كلامك على السريع، بس كنت أوضح الخبصة خخ
    1 point
  8. dxDrawText اخر 3 ارقمنتات تقدر تتحكم بالروتيشن حق النص
    1 point
  9. الله عليك وضح وضح انت قربت 70%
    1 point
  10. 1 point
  11. np. Make Dx easier to use is my target.
    1 point
  12. movetype always set to false if move types set to true , the "tovx " will be move speed. if move types set to false, the "tovx" will be time(ms).
    1 point
  13. 1 point
  14. I bet 10$ it was a map with many vehicles on the spawn location. Hint: Its not your mighty 1050Ti that causes lags, its the CPU because MTA performance gets terrible when it has to calculate a lot of collisions. How to reproduce: Play on "[SEA WAR] Islands" as ARMY player, spawn on one of the carriers. Your performance will be terrible. -> Now delete all vehicles with a script --- Performance is back to great 50fps easily. With my GTX 1070 i can play @ 50fps all day while mining Bitcoins/Ethereum in the background, but as soon as there are too many vehicles/players the performance drops to 30fps regardless of GPU usage.
    1 point
  15. عايزنا ازاي نصدق انك مبرمجها بنفسك و انت اصلا بتطلب طلب ذي ده راجع كودك و قولي كدا وش فايده اللوب ما دام انت ما تباه للكل ؟
    1 point
  16. الموضوع كان بقسم اخر وتم نقله الى هنا
    1 point
  17. Hello everybody Today in this tutorial i will explain to you the arithmetic, relational, and logical operators one by one. it's easy just try to follow my tutorial step by step . Arithmetic Operators: `+´ , `-´ , `*´ , `/´ , `-´ , `^´ Relational Operators : `<´ , `>´ , `<=´ , `>=´ , `==´ , `~=´ Logical Operators: `and´, `or´, `not´ Misc Operators: `..´, `# Following table shows all the arithmetic operators supported by Lua language. Relational operators are supplied which return the boolean values true or false. Following table shows all the logical operators supported by Lua language Also there is Miscellaneous operators supported by Lua Language include concatenation and length.
    1 point
  18. هلا اخوي ...
    0 points
  19. نسيتم dxSetShaderValue(titleShader,"gTexture",titleRenderTargert) خلاص راحت عليكم بحط الأكواد بعد شوي
    0 points
×
×
  • Create New...