Leaderboard

  1. Lord Henry

    Lord Henry

    Other Languages Moderators


    • Points

      1,189

    • Content Count

      3,074


  2. IIYAMA

    IIYAMA

    Scripting Moderators


    • Points

      963

    • Content Count

      5,275


  3. Doffy

    Doffy

    Members


    • Points

      733

    • Content Count

      1,518


  4. Master_MTA

    Master_MTA

    Members


    • Points

      703

    • Content Count

      3,334



Popular Content

Showing content with the highest reputation since 07/07/17 in all areas

  1. 44 points
    Multi Theft Auto: San Andreas 1.5.6 is released Today the MTA team is delighted to announce the release of MTA:SA 1.5.6. You will receive an automatic update soon, but if you don't have MTA installed, you can get it from the home page . There are many changes and improvements across the board, but one feature stands out as being especially exciting: custom animations! This has been a feature on our radar for many years, and @Saml1er was the one who decided to make what many have considered a dream, a reality. Take a quick look at this video of custom animations in action to get a glimpse of what's possible: Changes This release includes many additions, improvements, and fixes. Find the complete set of changes, and more information about the improvements listed below, in the 1.5.6 release notes. If you'd like to keep on top of all the things we're working on, why not watch or star our GitHub repository? Here is a heavily cut-down selection of features and fixes. Highlights: New features Ordered roughly by reverse chronological order New languages Bulgarian, Indonesian and Chinese (Traditional) (a3217) New server console feature for arrow command history (#274 by myonlake) New ACL property ModifyOtherObjects.resourceName for one resource only (6614d) New element functions getElementAngularVelocity, setElementAngularVelocity (#73 by lex128) New chat function clearChatBox (#215 by CrosRoad95) New vehicle functions getVehicleRespawnPosition, getVehicleRespawnRotation, setVehicleRespawnRotation (#334, #338 by l0nger) New goggle effect parameter "noiseEnabled" parameter to setCameraGoggleEffect (#324 by samr46) New drawing function dxDrawCircle (#266 by CrosRoad95, Saml1er) New jetpack functions setPedWearingJetpack, isPedWearingJetpack (#243 by Dezash) New element function getElementsWithinRange (de149) New GUI functions guiWindowIsMovable, guiWindowIsSizable, guiEditGetMaxLength, guiEditIsMasked (#272, #255 by FileEX) New fire function extinguishFire (#207 by CrosRoad95, #252 by myonlake, also 7838b) New world functions getPedsLODDistance, setPedsLODDistance, resetPedsLODDistance (#231 by CrosRoad95) New GUI scrollbar functions guiMemoSetVerticalScrollPosition, guiMemoGetVerticalScrollPosition (#248 by myonlake) New GUI functions guiMemoIsReadOnly, guiEditIsReadOnly (#236 by FileEx) New special property "underworldwarp" (#208 by CrosRoad95, #222 by myonlake) New vector support for collision functions (#217 by myonlake, #163 by Pawelo / 4O4) New animations functions setPedAnimationSpeed, engineLoadIFP, engineReplaceAnimation (Saml1er, with some help from Icensow, raw data loading courtesy of #247 by samr46) New colshape function isInsideColShape (#195 by tederis) New vehicle function for client-sided setVehicleHandling (#192 by Renkon) New world sound parameter to setWorldSoundEnabled to stop sound immediately (44844) New ped weapon function isPedReloadingWeapon (#149 by Neproify) New debug hooks pre/postEventFunction added to addDebugHook (#126) New event parameter "deleted" add to onResourceStop (98502) New vehicle function isVehicleWheelOnGround (#146 by ZReC) New command reloadacl (#131 by Timic) Enable switching camera view mode for trains (#125 by ZReC) New encode functions encodeString, decodeString (#184 by SDraw) New pickup events onPickupLeave & onPlayerPickupLeave (#176 by emre1702) New account functions getAccountIP, getAccountsByIP, getAccountsByData & setAccountName (#164 by emre1702) Highlights: Bug fixes and tweaks getChatboxLayout now works as advertised (#254 by myonlake) Return 2 vectors for ele:getBoundingBox (#305 by Pirulax, #332 by Addlibs) Fix inconsistencies in reading userdata in Player functions (#308 by Addlibs) Improve debug info for garbage collected files (#312 by Dezash) Fix crashes with account functions when using empty strings (faa57) Missing bShallow for server-side water (#240 by myonlake) Fix spawnPlayer rotation not working properly (#258 by myonlake) Fix false elements in getElementsWithinRange (#300 by Sergeanur) Removal of the /whowas command (0cffa) Improve connect to disconnect you less frequently (7fc29) Make connect port argument default to 22003 (d698b) Fix many bugs related to animations, jetpack and choking (#229 by myonlake) getVehicleType not being consistent server/client side (b08f3) Fix custom CEGUI skins accidentally breaking dxDrawRectangle (4e57a) Ignore colorcodes while tabbing in chatbox (#238 by Timic) Various bind tweaks, please tell us if something is broken (by emre1702) Fix empty string in getVehicleNameFromModel (instead of false) (#219 by emre1702) Weather blending improvements (#204 by emre1702) Fix 'stream_title' meta tag when the playback is started (#206 by Sergeanur) Fix problems when using a controller with more than 7 axes (382a3) Console no longer displays an error message when pressing the key of a disabled MTA control (23dad) Fix crash caused by calling client-side setPlayerNametagShowing with a ped (554a2) Fix server crash on server-window resize (becf0) Download This release is backwards compatible with the older 1.5.x releases (1.5.5, 1.5.4, all the way to 1.5). However, if you would like to take advantage of all of these useful changes, you will need to go and download the update! Servers: binaries are available, and don't forget to update your default resources. What's next? We're continually working on new features and fixes for MTA. If you're happy to report bugs and crashes do try out our Nightly release stream. You can do this by going into Settings -> Advanced -> Auto updater -> Update build type. Change to "nightly" and hit "Check for update now". Only do this if you like crashing and like filling out bug reports. We're also working on a brand new community: we want your suggestions, ideas and feedback! If you have any questions or would just like to chat with the community, do check out our official Discord server. We have channels for scripting, general support (bugs), mod development, and many more! Thank you! Thank you very much to the following community members for their work towards this release: Addlibs, ArranTuna, CrosRoad95, Dezash, Dutchman101, Einheit-101, emre1702, FileEX, forkerer, Icensow, jlillis, l0nger, lex128, lopezloo, MIKI785, myonlake, Neproify, Pawelo / 4O4, Pirulax, Renkon, samr46, SDraw, Sergeanur, tederis, Timic3, ZReC, and many others who helped document on the wiki, reported bugs, and helped out with issues. (If your name is missing or you want to change your entry above, please PM @qaisjp) You could be on this list! We're always on the lookout for new contributors. Contribute on GitHub, and chat with us on Discord. Finally, everyone, please give a 👋 to the newest maintainer of Multi Theft Auto: @Saml1er. Until next time, The MTA Team
  2. 39 points
    Multi Theft Auto: San Andreas 1.5.7 is released Today we are proud to announce the release of MTA:SA 1.5.7. You will receive an automatic update soon, but if you don't have MTA installed, you can get it from the home page. This is the final release to support Windows XP and Vista — if you still use Windows XP or Vista, upgrade Windows now. We are also looking for a web designer to help us create a new website! Statistics Multi Theft Auto: San Andreas turned 10 years old last week. Happy birthday! This is the 24th 1.x.x release 359 days since our last release 27 new functions 4 new events 117+ bug fixes and changes 540+ commits 30 contributors, of which 7 are new 64+ total contributors Download This release is backwards compatible with the older 1.5.x releases (1.5.6, 1.5.5, all the way to 1.5). However, if you would like to take advantage of all of these useful changes, you will need to go and download the update! Servers: binaries are available. Do not forget to update your default resources. Highlights This release includes many additions, improvements, and fixes: New drawing functions dxDrawPrimitive and dxDrawMaterialPrimitive Improved performance Fix swimming speed on higher FPS Skimmers can now lift off water at high FPS New events onClientWorldSound, onClientPedStep, onClientVehicleWeaponHit Surface property functions like engineSetSurfaceProperties and much more! Read the 1.5.7 release notes for a complete set of changes and more information about the improvements listed above. Watch or star our GitHub repository to keep on top of all the things we're working on. Important future script changes From 1.6 onwards we will be making at least the following changes: callRemote callbacks currently set the error code to nil when there is no error. In 1.6, to be consistent with fetchRemote, the error code reported will be 0. See GitHub #294. Since July 2016 if you provide an invalid string like "randomstring" when a function expects a number, the string will be treated as 0 and raise a script warning. In 1.6 this will be an error. You will still be able to provide strings containing numbers (e.g. "100" and "12.34"), this change only affects invalid strings. See GitHub #1043. When providing a width and height of (0, 0) to createBrowser or guiCreateBrowser you will encounter a script error instead of a warning. The warning was introduced Feb 2019. See GitHub #1069. Some functions expect only unsigned integers (positive numbers), and since Jan 2016 providing negative numbers would be a warning. This will now be an error. See GitHub #1070. Since Aug 2015, we replaced the custom mtalocal:// URL scheme with http://mta/resourceName/blah.html. This mtalocal:// URL scheme will now be removed. See GitHub #1071. This list is inconclusive and we may introduce more changes later. What's next? Multi Theft Auto depends on community input and contributions. To keep a project like MTA going we need LOTS of people. You can help in the following areas: Designing We are looking for a web designer to help us create a new website. Testing and bug reporting Whenever you encounter a bug or recognise a need for improvement, we can't fix it until you tell us your problem! We're continually working on new features and fixes for MTA, and this always needs testing. Join our Nightly release stream (Settings -> Advanced -> Update build type) and make sure you keep in touch with on Discord and report issues on GitHub. Programming If you know C++ you may be interested in helping improve Multi Theft Auto's client. Working on open-source software may seem scary, but the best way is to try! Read GitHub's open source guide, and then find an itch to scratch, or scratch your own! Documentation Documentation is important, but also time consuming. If you enjoy writing and have some knowledge of English, or you would like to translate the English version to your native language, you’re very welcome to do so. Just head over to our wiki, create an account, and start editing! Support Do you like people? Can you give calm and thought-out responses to users needing help? Then you can spend some time providing support to those who need it. Many answers can be found on our wiki, so make sure to take some time to read it. Then, either join our chat or forums (linked below), or simply help us sort out issues and answer questions on the GitHub repository. Translation Want to translate MTA to your own language? Awesome! Visit us on Pootle. As soon as your translation is approved, it will be pushed to our repository for use in future releases. Donations Keeping the MTA downloads, master server and websites alive costs money! If you want to help us sustain our financial expenses, please donate! Thank you! Thank you to the following community members for their donations this year: Arran, [RUS] Artem Smirnov, Atti, (SAUR)Castillo, CEKfile, .:CiBeR:., Dmi7ry, HACKER99, Malone, Nero, Nicolae Vlad, pentaflops, Platin, -ffs-Sniper, Tapleto-Hos Thank you very much to the following community members for their work towards this release: Addlibs, Arran, CrosRoad95, Dezash, Dutchman101, FileEx, forkerer, Haxardous, lex128, lopezloo, LopSided, Neproify, nonamenoname, ricksterhd123, samr46, StrixG, tederis, TheNormalnij, xerox8521, xLuxy and many others who contributed to our wiki and helped out with issues. (If your name is missing or you want to change your entry above, please let us know on Discord!) You could be on this list! We're always on the lookout for new contributors. Contribute on GitHub, and chat with us on Discord. We have channels for scripting, general support (bugs), mod development, and many more! Finally, please give a 👋 to our newest contributor @myonlake and our newest addition to the MTA team @botder! Hope you've had a great summer! — MTA Team
  3. 28 points
    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.mtasa.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
  4. 27 points
    Hello. 2019 is nearing to an end, so here is our traditional "A year in Recap" post for you. Below you can find the summary of what has happened this year - along with the current status of an entry (where applicable) and other things that might be interesting to you. 📰 2019 in Recap Late January, we have refreshed our Forum Rules - we gave them a new look and rephrased a bunch of paragraphs to make them more clear and easier to follow. In May, we have decided to drop support for Windows XP and Vista in our future releases. These operating systems are no longer supported by Microsoft and only a handful of our players still use them. We have advised our players to upgrade their PCs to newer Windows versions. While Windows 7 support will be soon ended by Microsoft as well, we still intend to support it in MTA:SA for a while. In July, we have opened an User Guides section on our forums, which aims to provide our users with quality guides and tutorials for various MTA-related topics. We are still looking into improving this concept. On 31st of August, we have released Multi Theft Auto: San Andreas 1.5.7. This release was focused on performance improvements, minor scripting additions and bugfixes. It is still the current release and, as mentioned above, is the last main release for Windows XP and Vista. On the same day, we have asked you guys to help us re-design our community website. The work on the new community is currently on hold however. Later in September, Rockstar Games has released GTA: San Andreas for free on their launcher app (for a limited time). We have added support for it in MTA:SA shortly after. 26th of October marked the 15th anniversary of Grand Theft Auto: San Andreas original release on PS2. While it was not the game we started with, it was the game that allowed us to make MTA the successful mod it is today. 📺 A bunch of interesting MTA:SA-related YouTube videos from this year MTA SA: SAPDFR Online Gameplay 171 (Flaming in the Cold) - server SAPDFR.org, video by Armor23OnPatrol [DM] NeiT ft. Gteatero ft. nX_ - Demons Skills 3 - video by GercszTV FBX replace per element feature - concept and video by CrosRoad95 [MTA SA] Let's play S.T.A.L.K.E.R. - server ex-zone.ru, video by TEDERIs MTA:SA - Legend Mercy Tactics - video by TheGam3r23 MTA:SA Hydra Stunts 2019 [SW]Supa Innovation - video by SupaHotFire 📈 Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 31808 players 2019.12.15 (at 17.30 GMT) Highest recorded number of concurrent unique players 34653 players 2018.02.03 (at 17.30 GMT) Recent number of daily unique players 132450 players 2019.12.21 (Saturday) Highest recorded number of daily unique players 185818 players 2018.02.03 (Saturday) Recent number of monthly unique players 531728 players November, 2019 Highest recorded number of monthly unique players 805903 players January, 2018 Player counts were lower than the ones from last year, but they're still large. Again, it's great to see that so many players are still interested in GTA:SA even though it's over 15 years old now! MTA:SA Version or series Percentage of players using that version or series as of 22nd of December, 2019 1.6.0 (old-alpha) 0.1% 1.5.7 97.80% 1.5.6 1.20% 1.5.5 (and older) 0.70% 1.4.x 0.1% 1.3.x 0.1% The latest stable version is the most popular one - and that's good. 📟 Status updates Not much to say at the moment. Things have slowed down a bit, but we are working towards the next release. That's it for now. ☃️❄️Happy Holidays and best wishes to all of you in 2020! 🥂🎆 -- MTA Team
  5. 24 points
    Summer is over, but fear not, we have got a new release for you - Multi Theft Auto: San Andreas 1.5.5! This release is focused on bugfixes (most notably, some popular crashes were fixed with help from @Dutchman101 - eg. this one, code cleanups and under-the-hood improvements for developers (migration to a Docker-based environment and support for VS2017 and GCC-6). It may look like it is not much of an update, but the amount of such smaller changes should be a good incentive to update. In other news, we have enabled some additional forum account security features for your convenience - namely a possibility to set a security question(s) for the account and support for Authy and Google Authenticator two-factor authentication. You can enable them in your Account Security settings. Release Highlights updated CEF elements and fixed red/blue color swap issue with Intel VGAs added 'localhost' to the hardcoded CEF whitelist modified launch patcher to work with more exe variants added black outline option for chat text fixed #4166 ("Engine Sounds of other Helicopters and planes missing unless you get in a Helicopter or plane.") fixed #9681 ("Unable to hear proper engine sounds when sitting in car as passenger") fixed #3944 ("Radio titles do not always show.") fixed #8590 ("createEffect with some effects places it's sfx sounds to position 0,0,0") added guiGetCursorType(), isResourceArchived(), getDevelopmentMode(), setDevelopmentMode() (used to be client-only, now it's also server-side), debugSleep(), setVehicleModelExhaustFumesPosition(), getVehicleModelExhaustFumesPosition() improved client connections through firewalls fixed FOV setting not updating censored onClientConsole for login command potentially fixed crouchbug resource pack: various changes in admin, editor, freeroam, headshot, ipb, joinquit, killmessages, play, and realdriveby ... plus more! A complete list of changes can be found here (recommended read) and here (incomplete, from r11302 upwards). List of changes to the resource pack can be found here (starting from and including Apr 22, 2016 upwards). Want to download MTA:SA 1.5.5? Click here to download the build for Win 7+. Looking for a legacy build for XP/Vista? You can download it here. Or you can click here to go to our home page. Once there, click the Download button at the top center of the page, then choose your build and you are set. Linux server packages are also available. This release is backwards compatible with other 1.5-based builds (1.5.4, 1.5.3, 1.5.2, 1.5.1 and 1.5). However if you still use these versions, why not upgrade to the newest one? It works just as good, or even better. Community credits for this release: AboShanab, Arran, CrosRoad95, Dezash, Dutchman101, emre1702, Gothem, lopezloo, Necktrox, qaisjp, Sergeanur, ZReC ^ Have you contributed to MTA:SA 1.5.5's source code/resources pack but were not mentioned in the above list (or maybe you would like to modify your entry above eg. change your nickname or add a link to your Twitter/Github)? PM @jhxp with a link to your contribution (for missing entries only) and you will be added ASAP ^ See y'all. -- MTA Team
  6. 23 points
    Hello. This is my new custom window system with widgets. Just rewrited window system, including this custom GUI widgets: - Scroll Panes - Buttons (+ buttons with images) - Progress Bars (automatic checking for vertical or horizontal using its size, square is horizontal) - Scroll Bars (same as progress bars) - Custom Themed Edit Boxes, Memo Boxes, new widget - Number Boxes (support mouse scrolling) - Check Boxes - Combo Boxes - Tab Panel with tabs - Labels - Dialog Boxes - Tooltips - Loading Circles - Table Views (Grid Lists) Here I've just used only OOP coding style, just copy this one lua file in your projects, and start this resource automatically, because this file getting directories from main resourcename, and using files without copying. Screenshots Video: Example - Login Panel. Author - Estet (DK). Tutorial of installation: Download (GitHub) Wiki Documentation Thank you.
  7. 23 points
    Hi there. The Winter Holidays are here, so as usual we have got a new recap and status update post for you. Here is the summary of what has happened this year. 📰 2018 in Recap We made efforts towards the new release through the first half of the year, so there was not much to talk about. There was an incompatibility issue with the 360 Total Security software which we advised you about and later in the year, there was a similar issue with McAfee. Late July, we have asked you about your thoughts about refreshing the community.mtasa.com portal. We have received some interesting feedback from you and we are still thinking about ways of implementing it, while considering our current resources. Also in July, we have migrated our bug tracking services to GitHub Issues, making it easier to track specific issues and link them to GitHub commits and pull requests. This has also allowed us to clean up our bug tracker - the old system had nearly 8000 tracked issues, some of which were 13 years old or so. On 7th of September, we have released Multi Theft Auto: San Andreas 1.5.6. This release added support for custom IFP animations among other things, like fixing the input and FPS lag reported by some of our users. Then a few days later, we have advised you to upgrade your MTA:SA servers to the latest version due to a server crash exploit that was discovered. There were some additional issues with this hotfix that were spotted later, but they have been all fixed within few days. If you have not yet upgraded your servers though, we still urge you to do so. 📺 A bunch of interesting MTA:SA-related YouTube videos from this year nX_ Vol.18 - CodeNX™ - 첫 장 - video by ElCrowMvs / map by nX [GTA:DM] Wonder - Interstellar - by Wonder MTA [MTA] Vice City - Map Preview #1 (JStreamer v3) - by Liberty City Roleplay Multi Theft Auto - Tactics - by LoG4nTG Multi Theft Auto - MTA CIT / GTA SA - San Andreas Police Department's 7th Anniversary (Dance Show) - video by PeteyFTW / server: CIT Multi Theft Auto San Andreas Fail + Funny moments #1 - by Mr. Green Gaming Multi Theft Auto: San Andreas - MTA DD - Map: Orgazm Cross - video by Game Master / map by Orgazm MTA:SA Fast And Furious Paradise Trailer ! - by SDRIFTER Abdlmounaim 📈 Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 30625 players 2018.12.16 (at 16.30 GMT) Highest recorded number of concurrent unique players 34653 players 2018.02.03 (at 17.30 GMT) Recent number of daily unique players 150390 players 2018.12.01 (Saturday) Highest recorded number of daily unique players 185818 players 2018.02.03 (Saturday) Recent number of monthly unique players 605834 players November, 2018 Highest recorded number of monthly unique players 805903 players January, 2018 Player counts were just slightly lower than last year, but we have also had some nice peak values at the beginning of the year. Good to see that there is still an interest in old but great games. MTA:SA Version or series Percentage of players using that version or series as of 24th of December, 2018 1.6.0 (alpha) 0.05% 1.5.6 97.20% 1.5.5 2.00% 1.5.4 (and older) 0.40% 1.4.x 0.20% 1.3.x 0.15% Similar to last year, two of our most recent releases are used by over 99% of our player base. It means that there is little fragmentation between our releases and that players in general upgrade to the newest release once it is available. Also, there seems to be some interest in the newest alpha version as well - that is nice too. 📟 Status updates Community-wise, our Discord has expanded this year - currently we have got 10 language-specific sections available for you there, as well as the active as usual English ones. We have also opened a new forum section recently to keep appeals for global game bans in one place. Over the next few weeks we intend to refresh our forum rules to better suit the current forum needs. As for mod's development, we will continue working on the next release. We are thinking of integrating a new version of the client installer to reduce amount of issues encountered when installing MTA:SA (as well as to make it easier to investigate the remaining ones). We will also consider adding new features provided by our community members, such as editing collisions and adjusting surface properties by CrosRoad95. That's it for now. 🎄❄Happy Holidays and all the best to you in 2019! 🎉✨ -- MTA Team
  8. 21 points
    It's official, MTASA has been bought and we are becoming SAMP. Future MTASA builds will be closed source and half the features removed. Have a nice day!
  9. 20 points
    السلام عليكم ورحمة الله وبركاته أقدم لكم اليوم أخر مشاريعي وأفضلها بالنسبة لي وأصعبها, حيث استغرق مني هذا العمل الضخم 20 يوم و 1600 سطر وهو عبارة عن لوحة أدمنية خارجية تمكنك من التحكم بالسيرفر بدون تشغيل اللعبة والدخول للسيرفر, وبالنسبة لي سيكون مفيد جداً وأسرع C# - LUA : لغات البرمجة : مقطع توضيحي للبرنامج : ملاحظات أولاً : لا تغير اسم السكربت ولا ما راح يشتغل البرنامج ثانياً : السكربت يحتاج صلاحيات ادمن ثالثاً : للتعديل على القروبات أو الصلاحيات راجع ملف الميتا التحميل : اضغط هنا للتبليغ عن الأخطاء أو الاقتراحات أو المشاكل تفضل بالأسفل أو الرسائل الخاصة مع تحياتي لكم
  10. 19 points
    Hey, i reworked mta community webpage. I apologize in advance for my bad english ❤️ Russia power!
  11. 18 points
    السلام عليكم ورحمة الله وبركاته اليوم رجعتلكم بمود لسيرفرات الزومبي والي هو مود ال hud المود كما هو قدامكم خصائص جديدة : - معرفة البنق والفبس - معرفة الوقت الحقيقي - لوق فلوس - قولد تحت الفلوس عن طريق داتا الي انت تحددها - لما تعشق السلاح يكتبلك Reloading - نجوم جديدة مكان القديمة - شريط الدم يكون علي حسب الستات حقت الدم حقتك يعني لو خليت دمك 200 يظبط عليه ____________________________________________ الحين نيجي للأهدائات @*RayaN-Alharbi. @Abdul KariM @Rakan# @#,+( _xiRoc[K]; > @#StrOnG_,) @KhaledAlamri @MR.SAMSUNG @iMr.WiFi..! @سعد الغامدي @iPrestege @#Soking @Default#^ @Ahmed Ly @MR.TOUNSI @Master_MTA @#Mr.Pop @!#NssoR_) @The Killer @N3xT @Abu-Solo @AbU - W6N @MR.Mosa @Mr.Mostafa @#[K]iLLeR<3 @#[K]aTakuRI-,? @TAPL @Sha67 @shwaeki @EH10 @</Mr.Tn6eL> @ALw7sH ______________________________________________________ الان وقت التحميل Hud _______________________________________________________ ويلا مع السلامة
  12. 17 points
    A simple script of dressable characters and deformable faces. You can move every vertex of the head with a simple displacement shader. The script is in test state right now, I'll create a new editor later. Hope you like it.
  13. 17 points
    Introduction Modding is a term used when modifying components, files and what not, in this particular case modifying game installation files in order to achieve unique results not seen in the vanilla game. GTA:SA is 3D era, where modding the game requires special 3D packages. Older games such as GTA:II uses a 2D engine, which means that modding the game was commonly done with image editing applications. We will cover some aspects of modding game textures and models. This guide intends on introducing those inexperienced with modding and 3D as a whole, on how to obtain 3D software and their recommended tools. It also introduces ways to import and export models, basic workflows for 3ds Max, texturing and creating models. TOC 3D packages, helpful tools and how to obtain them Extracting game assets How each type of game model works Limitations - MTA vs GTA Working with 3ds Max Texturing a game-ready cube 3D packages, helpful tools and how to obtain them There are various applications being used for modding. Although some has more tools available, there really isn't one that tops the others. In this section there'll be lists of a few 3D packages and tools used for modding. 3ds Max, arguably the most used program with the greatest amount of third-party plugins and scripts for various games. For GTA:SA, this program is favored by many modders due to it having 3rd party scripts for dealing with animations, collisions, lighting, modeling etcetera. There isn't much that 3ds Max can't, that other programs can, when it comes to GTA:SA modding. Although this can be expensive to run on a longer term, there are education licenses available which last for 3 years. These do not allow commercial use, and is marked purely as "educational use only". View more. Kam's (vanilla) max scripts, the first official script package for modding GTA:SA with 3ds Max. After the release of his scripts, a lot of others has developed scripts of their own, some of which are more optimized and less prone to issues. Even despite Kam's scripts having overseen issues, it is still to this day widely used for tasks such as, but not limited to; IPL map generation and import, collisions, animations, characters, vehicles, environment modeling. View more. Kam's (2018) max scripts, a modified version of Kam's vanilla scripts for 3ds Max. Notable features that were added are; DK22pac's Normal map plugin support, reflection map support for environment models, 2dfx panel for lights such as aircraft lights or street lamps. View more. The Hero's RW importer/exporter, a modern plugin that works extremely well with vehicles and environment models. Due to its simplified layout it is very easy to get used to. It's far recommended to use for vehicle model import/export due to its quality handling and materials, which are based on RW formats (renderware, the engine GTA:SA runs off). With the plugin using different model material formats from Kam's, it comes with a maxscript to convert scene materials from GTA_MTL to RW_MTL and vice versa, if needed by the modeler. View more. Deniska's max scripts, a pack for various types of GTA:SA modding, some features are obsolete for MTA users due to IPL and IDE modification required. Although, the pack does come with a few tools that may be useful to MTA modders, such as prelight tools to set the vertex colors and illumination to fixed values. View more. DexX's 2dfx export script, a standalone 3ds Max script that exports Omni and Dummy informations to .sae file formats, to then be added to the .dff using RW analyzer. With this script it's possible to integrate lights and particles into custom models, e.g flashing aircraft lights, street lights, fire and smoke, etcetera. With the release of Kam's 2018 scripts, this script is used less as using Kam's may be less work for some cases. View more. Blender 3D, a freeware (yes, completely free, no paid watermarks or any limitations), not as favored by modders throughout the years until recently, where a developer has released his script 'DragonFF' on GTAforums. Although it is WIP, modders has already binned 3ds Max and moved permanently to Blender. Although Blender is free, it actually combines several programs into one, allowing a Blender user to sculpt, paint, do lighting, professional rendering and modeling in one. A recent update in 2019 changes the RMB selection to LMB and UI among other things, making for a potential alternative to 3ds Max. View more (Blender). View more (Blender GTA script) Zmodeler, not as commonly used as the aforementioned programs, although it is being used very frequently by modders in various games, most notably for GTA:games. It does not have support for skinned characters, although it is being commonly used for vehicles, and sometimes environment modeling as well. This is a fairly inexpensive solution, but lacks tools for more broad modding. View more. Sketchup, a 3D application that focuses on architecture. For modding, it is a rather uncommon, though has a free and paid version and can be used for seemingly OK modeling. It does not have access to any 3rd party scripts for GTA:SA, hence its only use is modeling and then exporting model files to then import into 3ds Max or Blender. View more. Photoshop, mainly used for graphic design, but can also produce 3D models, video, GIF and textures for assets. Photoshop is the most favored by modders in regards to working with textures e.g paintjobs and retexturing. Although there are alternative image editors in the market, Photoshop definitely hits the top in terms of usable scripts (user-customized scripts as well) and ease of workflow. View more. DFF Viewer, a 3D graphics engine that is used for visualising GTA:SA models and supports .DFF and .TGA formats. Only single dff's can be loaded at a time. Though this is rarely used by those who has access to 3ds Max and Blender, it is commonly used for troubleshooting/testing work that involves retexturing a model e.g changing the clothing textures of a character. This program is entirely free and available from various GTA modding sites. View more. TXD Workshop, a texture dictionary editor that has been around for years, only since recent years to be succeeded by Magic TXD. Though TXD Workshop may not be the best for setting up TXD files, it has a built-in IMG archive editor, allowing one to browse all of the contents of gta3.img. View more. MagicTXD, a new texture dictionary editor with features for mass exporting .TXD contents from folders into image subfolders, texture compression, mipmaps, resizing textures etcetera. This is broadly used for .txd files and almost took over TXD workshop when it comes to working with texture dictionaries. View more. RW Analyze, a multi-use program with notable features being; ability to lock/unlock game files, add data to game models e.g 2dfx and vertex colors information extracted from other DFF files. View more. Extracting game assets In order to start modding GTA, access to the files is required. The files in question are commonly found in parent files that require some sort of program to open. In this case, TXD Workshop or any IMG editor and optionally Magic TXD for later on will work just fine. The below steps shows one way to extract all models and their texture dictionaries. For IMG editors (e.g Alci's IMG Editor): Open the editor. Under File, select Open. Find gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files and select Export. On the popup window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files and export them individually)) For TXD Workshop users: Open TXD Workshop. In the toolbar it says Open IMG. Click this, then find and select gta3.IMG stored in GTA SA directory\models. Highlight the first file in the list, then scroll down to the very bottom and SHIFT+LMB click the file on the bottom. This highlights every file in GTA3.IMG. Right click the list of files, select Extract. On the window, find and select, or create a new folder on desktop called GTA SA ASSETS. Click enter to proceed. ((For cases where specific files are wanted, use the search field to find the necessary files)) Now the folder GTA SA ASSETS contains nearly every .dff, .col, .txd and so on used by the game. Assuming one would like having all of the textures in PNG, DDS, TGA or any other common image format, they may follow the below steps using Magic TXD. Inside GTA SA ASSETS create a new folder named IMAGES. Open any .txd file found in GTA SA ASSETS using Magic TXD. Navigate to the toolbar. On Tools, click Mass export. Export settings are as following. Game root = root folder containing TXD's Output root = folder where images goes Image format = self explanatory With texture names only = exports images directly to folder and duplicate named ones gets replaced by one another Pre-pended with TXD name = exports images with TXD prefix In separate folders = makes new folder(s) for every TXD's contents Hit export. This process may take some time. Note that this process is the same for other .IMG archives such as player.img. There are also .txd and .dff files elsewhere, such as \models\generic\generic.txd, which is the vehicle shared texture dictionary file. How each type of game model works Models used on GTA SA uses different rendering techniques and data hierarchy than others. This section will introduce the features that some models has that others don't. Vehicles: Vehicle model components utilises hierarchies, where each component is linked to a dummy (helper) and each dummy is linked to parent dummies e.g chassis_dummy, for them to be registered in the hierarchy. In order for vehicles to not look flat or cartoon, a few steps are made in the model; Diffuse material is given a grunge texture or AO map, this helps telling the depth of the vehicle as well as giving it a feel of realism, so it isn't just clean. A specular lighting image is applied to the vehicle surface material, giving it a fake shine when looking from certain angles. If the vehicle has hard edges (smoothing), this image can increase the visibility of the normals, retaining its original look rather than being flat without visible difference in geometry. An environment (ENV) map is applied to the vehicle surface material, producing a fake reflection that is animated horizontally as the vehicle travels. Vehicles also has a lot of hardcoded features such as headlights, brake lights, emissive lights, taxi/aircraft lights, rotatable components and dynamic collisions for special vehicles like Forklift. Vehicles are also the only dff models that uses baked collisions, which means they are stored in the .dff itself. Below is a detailed hierarchy used for cars, and special components used by a number of vehicles (click the spoiler). Skin characters: Ped skin characters uses bones (dummy objects) that are connected to each other and linked to the character model. These bones are not visible in-game. In order for the bones to know what part of the 3D model they're responsible for, the skin needs to be rigged. Character rigging for GTA:SA is done by applying weigh on vertices. Using heatmap display, colors go through blue-red, low-high respectively. Values go from 0 to 100. If the value is 0, it means that the vertex is not used for any bone. This can cause issues. If the value is < 100, it means that the vertex is used for multiple bones. This results in smooth animations ingame, as the 3D model transitions smoothly through each bone. If the value is 100, it means that the vertex is only responsible for one bone. Skin rigging is generally something that is being avoided by modelers and makes Skin modeling the most difficult on GTA. Bones are as shown: CJ character: Carl Johnson's 3D model is split into several pieces in order to be compatible with the clothing script used to let the player customize CJ. These models uses a function known as multiclump to support 3 meshes per dff; normal, ripped and fat. This is for CJ's health stats to physically show in-game. Other than multiclump and additional bones, modding CJ skin is essentially the same as any other ped skin. Map environment: World objects .dff contains only single models, though they do support omni and dummy objects for 2d effects. These types of models uses Vertex Colors/Face Colors. This requires the modeler to paint colors onto the model which is then stored in the vertex colors channel (daytime) and vertex illumination channel (nighttime). Although uncommonly used by R*, these models do support reflection maps like vehicles use. Goldfish's modified version of Kam's scripts is excellent for exporting with reflection maps. GTA SA utilises multiple collision archives (.col) for every IPL district, being responsible for all of the world objects' collisions. However, on MTA, collision archives are not supported, so custom collision files are single models per .col. Not every object uses collisions though, some merely has their bounding space. These objects can not be selected with MTA map editor, thus requires additional scripting or modding. Limitations - MTA vs GTA Speaking of native support, MTA currently is behind in several places. Notable features that aren't available on MTA, but on GTA are as following. Item Placement (IPL) - another type of mapping file, but contains a lot more functions such as zones for real-time reflections as seen in interiors. Item definition (IDE) - a file used to but not exclusively, define settings for models, enabling alpha flags, disabling backface cull, enable breakable effect and much more. Limit adjuster - a rework of the game that allows for adding more ID's and bypass common limits. This however is being developed by one of MTA's contributors. There are various limitations such as polys per model, max dimensions for models and collisions, (very) strict size limits for collisions and CPU usage that can easily cause issues for modders. Not to mention the majority of the game data files which most MTA servers likes to force original, else the player won't be able to connect. These limits all has potential solutions being developed as with the limit adjuster. Working with 3ds Max As described above, 3ds Max is without a doubt the most common program for GTA modding. It's also used by professionals within architecture and visualisation and film industry. What's amazing about this program is that whatever is created in 3ds Max can ultimately be added to the game. A modeler made a square - it can get added right away, no adjustments required. That's the charm of 3ds Max. There's no need for additional tools to process the model for it to be compatible with GTA. It is also the primary program that Rockstar's developers used for creating the environment in GTA:SA. At a first glance, the program may seem rather intimidating. The main functions of the program that a beginner should be aware of are listed below. Shows the default home screen with 4 viewports. Left, Top, Front and Perspective. The 3 side ones are Orthographic viewports while Perspective is in regular mode. It is also the most common one to use. Highlighting a viewport and pressing (left)ALT W will full screen the viewport. In order to rotate camera view, the user must click and drag the square in the upper right corner. Its face also tells which side the camera is viewing e.g Top. If one wishes to see viewport statistics such as polygons per model, vertex amount etc., clicking: [ + ] icon on the upper left side > Configure Viewport > Statistics > Total + Selection > Apply > Clicking 7 on keyboard shows the statistics. This feature is extremely useful for modelers who are limited in polygons per model, or simply wants to see how many polys a car is. Common keyboard shortcuts F1: Opens Autodesk help section in new browser tab F2: Displays blue overlay on models F3: Displays models in wireframe F4: Displays edges on models F10: Opens render setup 9: Shows viewport statistics Q: Select objects W: Select and move E: Rotate R: Select and (mode) scale U: Orthographic viewport mode P: Perspective viewport mode A: Toggle angle snap S: Enable snap D: Disable viewport G: Enable/disable grid J: Display bounding edges LALT X: Xray mode for model Ctrl Z: Undo action Ctrl Y: Redo action In a heavy program like 3ds Max, being able to change preferences to one's likings is important. Do so by going to Customize > Preferences. Performance, file settings and such can all be configured in there. For GTA:SA modding, knowing how to subdivide and add geometry to existing GTA models is very important. Below is a list with actions that may come in handy. No-brainer: Editable Mesh is inferior to Editable Poly. Use Poly, poly, poly, poly... Editable mesh modeling Vertex selection mode Edit Geometry section Attach: attaches another model in the scene to the selected mesh Chamfer: chamfer selection of vertices; creates additional geometry Weld: merges vertices together within a specified threshold Surface Properties section Edit Vertex Colors: sets the color and illumination of selected vertices Edge selection mode Edit Geometry section Divide: divides an edge, adding a new vertex where it was divided/split Extrude: create and pull a new face out from existing edges (keyboard shortcut: LSHIFT + LMB-drag) Face selection mode Edit Geometry section Divide: creates a new face Extrude: pulls the select face(s) outwards or inwards and creates new geometry off that Bevel: essentially an Extrude followed by scaling of the face Surface Properties section Flip: flips a face 180 degrees Smoothing groups: defines the smoothing of the model. Autosmooth is in many cases OK, but may not fulfil everyone's expectations Editable poly modeling Vertex selection mode Edit Vertices Connect: selecting 4 verts on a box side and using this function will triangulate the side. Edge selection mode Edit Edges Connect: creates an edge between the selected edges, as in a bridge between two cliff sides (use the 'Settings' to choose between multiple or one edge on creation) Polygon selection mode Edit Polygons Inset: places a new polygon inside the selected, allowing to be scaled Bridge: connects two opposing polygons by creating a bridge between them (can be used for walls and gaps) Edit Geometry Slice Plane: enables the user to create a perfect cut on the model, can be rotated by degrees Rendering scene Modelers working on projects for companies or friends might want to show what they've accomplished, but a regular screenshot may not suffice. Talking of a screenshot like this: Instead, the modeler might want to show the scene with textures. Perhaps more than just textures - lighting? reflections? transparency? - this is where 3D rendering comes into play, and can be done by simply pressing SHIFT + Q on the keyboard. This can also by default use alpha channel. However, the quality could improve. The quality of the render depends on the scene assets (models, materials, lights), the Renderer and its settings. By default, 3ds Max utilises Scanline Renderer. This is not a production quality render, but rather meant for test shots and demos. Though the quality isn't great, it's still possible to produce seemingly interesting renders. The following render took merely 8 seconds. Using 3ds Max allows modders to bring GTA:SA into modern graphics, easily comparable or even superior to ENB's. It also enables modelers to share visualizations of their models to help the customer understand how it could potentially look for their game. In the above render, a Skylight is used with Scanline Renderer. A very basic render, though interesting and contains lots of depth. In order to replicate this result, below are the steps to follow: On the Create panel, where one would normally find boxes and spheres, click the toolbar Lights. Where it says Photometric change that to Standard. Click the Skylight and place it in the 3ds Max scene. Settings for Skylight explained Multiplier: intensity of the light Sky color: the color of the light Cast shadows: enable to produce shadows, though this is more of an Ambient Occlusion than actual shadows Rays per sample: quality of the shadow, ideally keep at <5 for tests and 15-20 for final shots In the actual render above, a sample of 5 was used, creating grainy shadows but quick render. Backface culling was enabled to avoid slowing down the render time. Skylight is great light source and is generally used to illuminate an entire scene and not particular models. In the same Lights tab, one may find use of Omni or Free lights, which both works great. These are great point lights, which as opposed to skylight, are able to illuminate parts of the scene e.g acting as street lights. Modifiers When modeling, modifiers can come in use and save the modeler a lot of time. The following modifiers are highly suggested for beginners to know about. Bend: bends the model, effect depends on the differences in the geometry Mirror: copies the mesh and mirrors it on the other side, commonly used for vehicles using symmetrical geometry Smooth: generates and applies smoothing to the model, generally the lower values makes for higher file sizes Symmetry: essentially the same modifier as 'Mirror' Turbosmooth: Smoothens the mesh, adding geometry, uses iterations Unwrap UVW: advanced UV editing, commonly used for preparing textures for models like characters and game assets UVW map: basic UV editing, X/Y/Z projection mapping as well as spherical, box and planar mapping Vertexpaint: allows for painting colors onto vertices and faces, these colors are rendered during either ingame or night time Texturing a game-ready cube Modeling has to start somewhere. Using standard 3D primitives is a good place to start. For the purpose of this guide, a Cube will be created in 3ds Max and textured in Paint.net, a free image editing software. Video tutorial: To start off, navigate to 3ds Max's Create tab on the right hand side panel, as shown below. Shows the Create tab on the panel. For this guide, click on Box (Cube). Use LMB and click and drag the mouse in the viewport to create the cube. Now that the Cube primitive is spawned in the viewport, on the same panel that it was created from, go to Modify tab and set its dimension parameters to 5,0, 5,0, 5,0 and 1 segment for all 3. Convert the model to Editable Poly by right clicking it in the Viewport > Convert to > Editable Poly. Go into Polygon selection mode and scroll down until the following buttons are visible: With viewport selected, on the keyboard press `CTRL A` to select all faces on the cube. Now, where it says `Color`, click the bar and on `Value` set it to 100, then do the same for `Illumination` but value at 35. What this does is it sets the vertex colors so that the model won't be overexposed during day/night time. Exit polygon selection mode and on Modifier List, click that and find Unwrap UVW. This applies a modifier stacked on top of the Editable Poly mesh. Under Edit UVs click Open UV Editor. This allows the user to make changes to the UV coordinates which tells the model how textures are projected onto the model. On the editor, ensure that Polygon selection is enabled. While in the UV editor, press `CTRL A` to select all UV islands. On the top of the editor click Mapping, then Unfold Mapping.... Keep it as Walk to closest face and enable Normalize Clusters. Click OK. The result should remind the user of how a simple cardboard box in real life looks when it's yet to be folded into a box. With the model unwrapped, on the toolbar on the UV editor, click Tools > Render UVW Template. The export settings below are ideal for this particular task. If one wishes to know exact dimensions of each square, enable Seam Edges. After exporting, on the modifier stack, press Collapse to. This saves the new UV's. The width and height should be on a 1:1 ratio to avoid stretching issues. 1024x1024 is more than enough. On the rendered image window, click the Save button and find a location to save it in, name it Cube_unwrapped and use Alpha channel (optionally). Now open Paint.net and insert the image. Once happy with the result, export as cube_diffuse. Diffuse map generated with the help of a UVW template. In order to apply the texture on the model, simply drag and drop the image from file browser onto the model in the Viewport. Although the example above is not textured properly in regards to rotations, it shows what can be done by using UVW templates, and how easy it really is to produce textures for models made from scratch. The model can be directly exported as DFF. Materials are not required to be GTA or RW, they can be standard and still show ingame. Some exporters wants the model in Editable Mesh however, so converting it may be required. Thanks for reading this guide, we hope it helps and we wish you the best of luck with modelling! For questions on modding, please refer to MTA's modding FAQ or MTA discord #modelling channel.
  14. 17 points
    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.
  15. 16 points
    Presented By With more than 3 years of work I decided to publicly release my map conversions, I had dropped my previous listings due to some "Issues" however, they're back. ---------------------------------------------------------------------------------------------- Download Streaming Quality - 8/10 Get's the job done, awesome all around, but some places are better than others ---------------------------------------------------------------------------------------------- Download Streaming Quality 7/10 Beats VC in other places, very poor in others; as well as a huge FPS drop in the first island (Issues are rockstars fault) ---------------------------------------------------------------------------------------------- Download Streaming Quality 9/10 Beats both VC and LC ---------------------------------------------------------------------------------------------- Vehicle testing gridmap Download Streaming Quality 10/10 Perfecto ---------------------------------------------------------------------------------------------- Download Streaming Quality 7/10 Decent all around Might be a tad laggy due to the high poly and Russian nature of this map Extremely detailed for a user created map ------------------------------------------------- Download streaming quality 10/10 Test bed used when making Jstreamer 2.0, incomplete but very very light weight ------------------------------------------------- OBJs (Rebranded JStreamer) Required for all maps JStreamer 3.0 is a complete rewrite of JStreamer 2.0 with this new update you get more features, better streaming and quicker loading times. Any bugs can be posted here Questions or discussions can be either posted in this topic or here --- If you want to support my work, please donate https://www.paypal.me/BlueJayL
  16. 16 points
    Hello there! You found Dystopia: The Incident, an original sandbox post-apocalyptic RPG. Keep reading below and you’ll find out more... Test server: mtasa://46.105.109.59:22008 Discord: https://discord.gg/Zs5bWSX Current version: alpha 0.75, check out details here DOWNLOAD (0.75 alpha) Key concepts Food and water are scarce and you need to be on the move to stay alive. Inventory size is limited, forcing you to prioritize. Vehicles require constant maintenance. Faction camps, bases, shanty towns and other encounter zones all over San Andreas. Exploration is rewarded. World is densely populated with NPCs and who you choose to kill matters. Environment is harsh and punishes the weak and the dumb. Moral decisions to be made. End goal. Roleplay friendly. Designed to be also enjoyable as a single-player experience. Setting 2000: A series of catastrophic earthquakes smashed the cities and countryside of San Andreas. In the aftermath, the whole state found itself separated from mainland. Fear and selfishness roamed free, pushing society into chaos. In the heart of San Fierro, one of the largest cities of San Andreas, government-sponsored Zombotech Corporation was researching biological weapons in its underground facility. The labs were heavily damaged by the cataclysm and a deadly infectious agent escaped in the streets. While emergency services struggled to contain the disaster and minimize collateral damage, death was spreading unnoticed. 2001: The Establishment evacuated survivors of the outbreak in the barricaded city of Las Venturas but infection spread inside the fence. They nuked the city and placed San Andreas under strict military quarantine. Nobody gets in, nobody gets out. They dubbed the disaster ‘The Incident’ to minimize its amplitude, media soon went silent and survivors were forgotten. 2007: 6 years passed and things have not become better. Regular people picked things up from where the government left them and started to organize. This is a tough new world, populated with the full spectrum of humanity: resilient survivors, vicious bandits, cannibalistic raiders, oppressive military forces and the rest of the loons. No line between good and bad was ever so ill-defined. San Andreas is ruled with an iron hand by Governor Skinner, who took office only six days after the Incident. His armed forces fight to control the territory, herding men into the new Refugee Camp. Resources are scarce and many dropped the last remnants of morality when they faced starvation. Violent clans and factions fight over the remains, establishing turfs or just trying to stay alive. Militias fight for supremacy, idealists work to maintain civilization and everybody else just struggles to survive another day in an increasingly suffocating world. As it became evident that the government has no rescue plan for them, despair started to crumble the minds of the few sane left. All attempts to flee San Andreas are met with airstrikes. But there must be ways to escape this place... What you can experience right now Explore a detailed post-apocalyptic map with many encounter zones. Plenty of NPCs, both friendlies and baddies. Dynamic faction and spawn system. More than 40 missions already in the game. Detailed inventory with more than 100 items to be found and used. Basic needs, stamina, infection, various other modifiers like pain, bleeding, exhaustion or inebriation. Innovative looting mechanic. Four zombie types, with different behavior. Scavenge the world for materials to build settlements or to use simple crafting and cooking. Upgrade and drive rugged vehicles across the wasteland and engage in vehicular combat. Trade, recruit and discover parts of the story by chatting with NPCs. Experience dark humor and some strong themes (16+). Simple interface, consistent graphic style. What still needs to be done The current gamemode version is alpha 0.75. Required for beta: skills and abilities implementation, npc traffic, karma system and map completion (now >90%). Once the project hits beta and the core is completed we’ll start focusing exclusively on the missions and story. Seeking friends for the end of the world Want to jump onboard and take part in the development? Great, join our Discord server using the link on top (the recommended approach) or PM me here. We're always looking for like-minded developers. Wanted: scripters, mappers, storytellers, 3D artists and testers. However, keep in mind that we're not looking to monetize this project in any way. We’ve used the work of many MTA community members and the gamemode will be shared alike with the community when completed. You will gain full credit for your work but no other type of compensation. Share your thoughts We do love suggestions and implement all good fitting ones, so don’t be shy and tell us what you think about this project, using the channels highlighted above. The answer is guaranteed and we'll also give full credit for any original ideas. Media 100+ development screenshots here (I suppose this is what you were looking for from the beginning, instead of reading a wall of text) Thanks for reading! Watch this space for fresh information and media.
  17. 16 points
    مرحبا لقد قمت بإطلاق الاصدار الجديد من لوحة الادمنية العربية بعد ان لاحظت ان معظم الاعضاء يقومون بإستخدام لوحات الادمنية العربية القديمة التي مر عليها الدهر من دون اي تحديثات او حماية وكما انها غير مؤمنه كـ اي لوحة ادمنية حديثة الإنشاء,( وبالمناسبة انني هولندي ولا اتحدث اللغة العربية ) وكما انني بذلت الكثير من جهدي حتي اقوم بنقل الترجمة العربية من اللوحات العربية القديمة الي هذه اللوحة حديثة الصنع وكل ما اريده هو ان اقوم بإفادة اصحاب السيرفرات الذين يستخدمون لوحة الادمنية العربية القديمة وكما انه يمكنك ان تري اخر تحديثات لوحة الادمنية من خلال : https://github.com/multitheftauto/mtasa-resources/commits/master/[admin]/admin وإذا كان لديك صاحب سيرفر يستخدم لوحة الادمنية العربية القديمة رجاء اخبره بهذا الموضوع لكي يقوم بتحميل النسخة الحديثة من اللوحة العربية لتحميل اللوحة العربية DOWNLOAD:https://community.mtasa.com/?p=resources&s=details&id=14837 واذا كان هناك خطأ في ترجمة اللوحة رجاء اخبرني " لقد تمت ترجمة الموضوع من قبل نصور " ENG: I'm here releasing a new Arabic-translated admin panel from today's version (september 2017) after I noticed all community circulating AR panels were outdated as hell. As they pose serious security risks, eventhough I'm not Arabic, I felt it of such importance that I've spent a long time transferring translations from older circulating panels to this most up-to-date Admin panel. I'm helping a huge amount of server owners with this, because most will just use a Community version that is outdated because of the great time to invest in translating yourself. Ofcourse, you'll also benefit from new features and updates made to Admin recently, (look here: https://github.com/multitheftauto/mtasa-resources/commits/master/[admin]) both for this reason and security I advise you inform all server owners you know about this release and suggest they update if they're using Arab panels. If you spot any translation issues, please leave a reply. Main view example; (updated 24/09/2018)
  18. 16 points
    السلام عليكم ورحمة الله وبركاتة لقد تم إضافة خاصية حماية الحساب قبل فتره بسيطة وتم إنشاء هذا الموضوع لمن لم يلاحظ وجود هذه الخاصية او لمن لايعرف طريقة إستخدامها حتي ! اولأ طريقة تفعيل هذه الحماية عن طريق إتباع الخطوات التالية : Account Settings الذهاب الي ومن ثم كما موضح في الصورة ومن ثم سيطلب منك إدخال الباسورد الحالي لحسابك ومن ثم سيفتح لك هذه النافذه والان اصبح لديك 3 خيارات وسأقوم بشرح كل واحده منهم Authy: تقوم بإرسال كود سري لهاتفك ومن ثم سيطلب المنتدي منك إدخال هذا الكود السري في المنتدي لتتمكن من فتح حسابك Google Authenticator: يجب عليك تحميله علي هاتفك ومن ثم سيعطيك كود سري وسيطلب منك المنتدي هذا الكود السري لتتمكن من فتح حسابك Security Questions: اسئلة الامان ( لاداعي لشرحها لأنها معروفة ) ملاحظة مهمة : عند تفعيل اي واحده منهم سيسألك المنتدي عن الكود السري من وقت لأخر وهذا لا يعني ان هناك شخص قد قام بإختراق حسابك , هذا فقط للتأكد من انك انت صاحب الحساب الاصلي وحتي في حال تم إختراق حسابك من اي عضو اخر لاتقلق لأن حسابك سيكون بأمان ولن يستطيع فعل اي شي الا بعد ان يقوم بإدخال الكود السري الذي يتم إرساله لك تم تثبيت الموضوع لفترة مؤقتة واتمني لكم التوفيق
  19. 15 points
    Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Warning: DGS Version Lower than 3.4 is no longer supported. Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Basic: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Browser Plugin: Media Browser Color Picker Mask Remote Image QRCode Blur Box Rounded Rectangle Nine Slice Scaling Object Preview Support Canvas Scroll Pane's 3D Effect (TDX)Lopsided's dxlib Compatibility. 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "dgscmd" ( For more help, please input "help" in the CMD ) 8. Memo/Edit rewritten. 9. Object Oriented Programming Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS resembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support 17. Simple GUI To DGS (G2D) Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote/getPlayerIP. If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
  20. 15 points
    For long time i considered to do something with physics in mta. For now doing even simplest things such falling box, tree on flat area looks cartoonish. In my history of i saw few attempts of doing simple physics, mostly it was in closed area without bigger interactions with poor performance due you just can't calculate collision in other way than processLineOfSight, isLineOfSightClear or read directly .col file as Tederis did. I started with something to render things, thats how FBX https://github.com/multitheftauto/mtasa-blue/pull/1093 to bypass default rendering to handle future i'll introduce in future. That's how bullet physics project born, first idea how to use react physics, works simillar but is lighter and general smaller project but 0x416c69 suggested to use bullet. I'll use this topic also to prepare long list of features it contains for future copy paste to PR and wiki page The main assumption is to allow for create multiple world with completly independed simulations, get and set detailed information about current step of simulation, fully control how everything is simulated, quality of collision tests, speed and a lot more. i'm trying keep amount of functions low, because if that most stuff is packed into one function. Syntax and name of some function might change in future or along suggestions. Not all properties supports every physics element, some are only get, other set only, however most of them are set/get Current stage: I already implemented function such a: physics physicsCreateWorld() - responsible for creating new world for simulations, return element which will use later. physics-rigidbody physicsCreateRigidBody( shape-type, mixed arguments ) - creates rigid body which is use to simulation bahaviour of non-static shapes, collisions ( currently only few models in mta can do this in simple way ). physics-rigidbody physicsCreateRigidBodyFromModel( model ) - used to create rigid body directly from collision data taken from gta model. physics-static-collision physicsCreateStaticCollision( shape-type, mixed arguments ) - creates static collision which will not move at all ( it is still possible to move it by Lua script ) physics-shape physicsAddShape( shape-type, mixed arguments ) - if you create compound shape, this function let you add more shapes into static collision or rigid body bool physicsSetProperties( any physics element, physics-property, mixed arguments ) - main function to control physics, rigid bodies, static collisions, shapes. Works in simillar way as handling functions. mixed physicsGetProperties( any physics element, physics-property ) - same as above, but getting properties bool physicsDrawDebug( physics ) - use to visualization of world, must be used in render function bool physicsSetDebugMode( physics-debug-mode, enabled ) - use to turn off/on debugging features bool physicsBuildCollisionFromGTA( physics ) - used to create static collisions in specified world from original collisions, doesn't create whole world instantly, require to move player around world to load collision data. physics-constraint physicsCreateConstraint( physics, physics-rigid-body, physics-rigid-body, constraint-type, mixed arguments ) - use to connecting two or more rigid bodies into one entity bool physicsApplyForce( physics-rigid-body, vector from, vector to ) - pushing rigid body in particular point you choosed. bool physicsApplyCentralForce( physics-rigid-body, vector direction ) - apply force from central position of rigid, it's more like "accelereate", should be used more than once at the some period of time bool physicsApplyCentralImpulse( physics-rigid-body, vector direction ) - setting position from center of rigid bool physicsApplyDamping( physics-rigid-body, float force ) - i'm not sure, but it should slow down velocity and rotation of model by specified amount of units physicsApplyImpulse( physics-rigid-body, vector direction ) - i'm not sure how it works physicsApplyTorque( physics-rigid-body, vector rotation ) - same as physicsApplyCentralForce but for rotation physicsApplyTorqueImpulse( physics-rigid-body, vector rotation ) - setting rotation speed physics-properties: "mass", "position" ,"rotation", "sleepingthresholds", "restitution", "scale" "debugcolor", "filtermask", "filtergroup", "stiffness" `sleepingthresholds` means how slow rigid must move/rotate to sleep, it makes stops moving at all but still can be pushed by other rigids `restitution` bounciness, between 0-1 but accept any value above `stiffness` - for fixed constraint `filtermask` i still figuring out how it work, but should let you use 32 bit mask to set which rigid with which should collide Bullet documentation: https://github.com/bulletphysics/bullet3/blob/master/docs/Bullet_User_Manual.pdf page 13 contains useful information when which shape should be used physics-constraints: "pointtopoint", "hidge", "fixed", "slider" Physics-shapes: "box", "sphere", "capsule", "cone", "cylinder", "heightfieldterrain", "compound", "trianglemesh", "convexhull" `compound` is used for constructing rigid made of various shapes Plans for future: "heightfieldterrain" shape type accept black-white texture for faster creation Support for cloths, soft bodies Media: Videos are availiable at my youtube channel https://www.youtube.com/channel/UC95MpsQ1JppDNpMvl_7c1rg screenshots and gifs of current progress: Documentation i use: https://pybullet.org/Bullet/BulletFull I'm waiting for your suggestions Topic not finished
  21. 15 points
    Slipe is an open source framework that enables anyone to write scripts for MTA:San Andreas in C# instead of Lua, wrapping all MTA elements and classes and including some .NET Core namespaces. It is based on CSharp.Lua by Yang Huan. Slipe features: Runs on Windows and Linux Built in continuous deployment support with (GitHub) webhooks Object oriented wrappers for all MTA elements Async/await for MTA functions that use callbacks C# style Http requests, sockets and XML methods. Use Visual Studio and its Intellisense Type safety You can find more information about the project on https://mta-slipe.com. Our Discord Our Github The project is still in Alpha, and since it is open source anyone is welcome to contribute
  22. 15 points
    Introduction Properly handling your user's credentials (username and password) is very important, this guide gives detailed information and code samples on how to (properly) implement an account "system". This guide assumes you are not using MTA's built in accounts. Disclaimer: Any code shown in this tutorial is purely for illustrative purposes, and is not finished code, you should use it as a guideline, not a solution. Content The following topics will be discussed in this tutorial: How to hash and salt passwords (register) How to validate a hashed password (login) How to add "remember-me" functionality How to offer password recovery How to migrate from an older hashing algorithm, to a newer one Using a password policy (Extra) How to handle database leaks (Extra) What even is hashing and salting? For the purpose of this tutorial we expect a database structure which is somewhat similar to this: How to hash and salt passwords When you have a user register on your service, that user expects of you to keep their password safe. Whilst it is generally bad practice to use the same password for multiple services there are many users that still do so. Because of this it's crucial that you save the user's passwords in a way that an attacker will be unable to find out the original password the user typed. This includes if they have full access to your database. In order to do this we do what is called "Password hashing" When a user registers, your server receives the user's intended username, (email) and password. Before you save that password to the database you have to hash and salt this, luckily MTA has a function that takes care of this. If you wish to know more about what exactly it does, there's more information at the end of this tutorial. In order to hash this password you use the passwordHash function. This function is relatively slow (by design), so it is highly recommended you pass a callback to this function, so your entire script doesn't wait for it to complete. https://wiki.multitheftauto.com/wiki/PasswordHash local mysqlHandle -- we're assuming this value is set somewhere else in code function register(username, email, password) local player = client passwordHash(password, "bcrypt", {}, function(hashedPassword) -- callback function for hashing the password local handle = dbQuery(function(handle) -- callback function for storing the user in the database if (handle) then triggerClientEvent(player, "registrationSuccess") -- inform the user that registration was successful else triggerClientEvent(player, "registrationFailed") end end,mysqlHandle, "INSERT INTO users (email, username, password) VALUES (?, ?, ?)", email, username, hashedPassword) end) end addEvent("passwordTutorial:register", true) addEventHandler("passwordTutorial:register", getRootElement(), register) How to validate a hashed password Once you've saved the hashed password to your database you need to do a little bit of additional work when authenticating the user. Luckily MTA offers a passwordVerify() function, which is the counterpart of the previously discussed passwordHash(). What this function does it basically hashes the password in the same way, resulting in the same output hash. https://wiki.multitheftauto.com/wiki/passwordVerify In order to get the account the user is trying to log in to you have to do a query for an account which has the user submitted username, and of which the password matches through passwordVerify. PasswordVerify is also a relatively slow function, thus you should use a callback. function login(username, password) local player = client dbQuery(function (handle) -- callback for the query selecting the user by username local results = dbPoll(handle, -1) if (#results == 0) then triggerClientEvent(player, "loginFailed") return end passwordVerify(password, results[1].password, {}, function(matches) -- callback function for the password verify if (matches) then -- Do anything you wish with the database result to log the player in with the rest of your scripts triggerClientEvent(player, "loginSuccess") else triggerClientEvent(player, "loginFailed") end end) end, mysqlHandle, "SELECT * FROM users WHERE username = ?", username) end addEvent("passwordTutorial:login", true) addEventHandler("passwordTutorial:login", getRootElement(), login) How to add "remember me" functionality When users on your server log in, they often do not want to have to enter their username and password every time they want to log in. In order to satisfy this need you can implement a "remember me" function. What I've seen happen in the past, is people would store the user's password (encrypted) on the client. This is NOT safe, and should never be done! In order to properly use remember me functionality what you would do is upon login in, generate a random string. The longer the better. This random string is what we call an access token. You would then allow the user to log in with such an access token, preferably only once generating a new access token each time one is used. To implement this you would generate that token every time the user logs in, whilst they have "remember me" enabled. You will have to save this token in your database alongside your user. For extra security you could also store the user's serial alongside the access token, you can then validate that the access token is being used from the same device. https://wiki.multitheftauto.com/wiki/Filepath function login(username, password) -- This code should be put in the callback to the dbQuery function, but to keep the example clean that's not shown here if (rememberMe) then local token = generateRandomToken() dbQuery(mysqlHandle, "INSERT INTO access_tokens (user_id, token) VALUES (?, ?)", results[1].id, token) triggerClientEvent(player, "loginSuccess", token) end end function rememberMeLogin(username, accessToken) -- this function handles a user's login attempt dbQuery(function(handle) local result = dbPoll(handle, -1) if (#result == 0) then triggerClientEvent(player, "loginFailed") else -- Do anything you wish with the database result to log the player in with the rest of your scripts triggerClientEvent(player, "loginSuccess") end end,mysqlHandle, "SELECT users.* FROM access_tokens JOIN users ON users.id = access_tokens.user_id WHERE users.username = ?", username) end addEvent("passwordTutorial:loginRememberMe", true) addEventHandler("passwordTutorial:loginRememberMe", getRootElement(), login) How to offer password recovery Offering password recovery requires a little bit more than just your MTA server. Generally password recovery is done with emails. So you would need access to an email server / service which you can use to send an email from an HTTP request. (Like you can do with fetchRemote()). When a user requests a password reset, have them enter the email you registered with. You then fetch a user from the database with this email address. You would then store a password recovery token for this user. This token, just like the remember me token, is a random string. Ideally, you would send the user a link with a password reset form that goes to a webpage where the user can reset their password. You could do this with an external service, like a webserver. Or you could use MTA's Resource web access for it, but if you do make sure you handle permissions properly for anything else that uses this. However another option would be to have the user copy paste the generated token from the email into you server's login window. Which of the two solutions you pick is up to you, my personal preference goes to the one with the link in the email. But in either case the server side logic is the same. When the user attempts to perform password recovery, verify that the token they give you belongs to a user, and then change the password to the newly requested password. Make sure you hash this password the same way you do in your login. function requestPasswordRecovery(email) dbQuery(function (handle)) local result = dbPoll(handle, -1) if (#result == 0) then triggerClientEvent(player, "passwordTutorial:passwordRecoveryRequestFailed") else local token = generateRandomToken() dbExec(mysqlHandle, "UPDATE user_data SET recovery_token = ?", token) -- mail the token to the user, mail implementation depends on the mail server/service you use triggerClientEvent(player, "passwordTutorial:passwordRecoveryRequestSuccess") end end, mysqlHandle, "SELECT * FROM users WHERE email = ?", email) end function recoverPassword(recoveryToken, password) dbQuery(function (handle) local result = dbPoll(handle, -1) if (#result == 0) then -- this is only valid if you have the user request password recovery from ingame triggerClientEvent(player, "passwordTutorial:passwordRecoveryFailed") else passwordHash(password, "bcrypt", {}, function(hashedPassword) -- callback function for hashing the password local handle = dbExec(function(handle) -- callback function for storing the new password in the database if (handle) then -- this is only valid if you have the user request password recovery from ingame triggerClientEvent(player, "passwordTutorial:passwordRecoverySuccess") -- inform the user that registration was successful else -- this is only valid if you have the user request password recovery from ingame triggerClientEvent(player, "passwordTutorial:passwordRecoveryFailed") end end,mysqlHandle, "UPDATE user_data SET password = ? WHERE recovery_token = ?", username, recoveryToken) end) end end, "SELECT * FROM users WHERE recovery_token = ?", recoveryToken) end Besides changing the password, it's important you also delete any access tokens that user might have if you're using remember me functionality. It is also good practice to make recovery tokens expiry after a certain amount of times, and not allow a recovery token to be created whilst one is already in progress. This prevents a user from sending a large number of emails from your service. How to migrate from an older hashing algorithm, to a newer one Maybe after reading this topic you realise that your password security is not what it should be. So you want to change your old password hashing / validation logic to the ones explained in this topic. And due to the nature that hashes can not be "unhashed", you can't simply migrate your passwords over. So in order to migrate the passwords what you have to do is when a user logs in, first validate their password with the old hashing algorithm. If this matches, then hash (and salt) it with your new hashing algorithm and save it in your database. Make sure to delete the old password otherwise your password security is not any better than before. Using a password policy Passwords policies are important to prevent your users from picking a password that is too easily cracked / brute forced. Many password policies come in the form of "Must have at least one capital letter, one digit and one number". But that discards that fact that the best way to make your password more difficult to crack, is making your password longer. So in the code snippet below is a function that measures the 'search space' of a password. The search space of a password is the amount of possible passwords there are with a certain combination of characters. In order to use this, you would have to set a minimum password search space when a user registers for an account. This minimum is up for you to set, but be reasonable, you shouldn't expect a user's password to be impossible to remember / create. I recommend playing with the function a bit to see what values you get out of it, and pick something you believe is sensible. function getPasswordSearchSpace(password) local lowerCase = password:find("%l") and 26 or 0 local upperCase = password:find("%u") and 26 or 0 local digits = password:find("%d") and 10 or 0 local symbols = password:find("%W") and 32 or 0 local length = password:len() return (lowerCase + upperCase + digits + symbols) ^ length end -- The below function calls are to indicate the difference in search space for a set of passwords print(getPasswordSearchSpace("a")) print(getPasswordSearchSpace("abc")) print(getPasswordSearchSpace("Abc")) print(getPasswordSearchSpace("Ab!")) print(getPasswordSearchSpace("Ab!0")) print(getPasswordSearchSpace("Mu#9A0h.")) print(getPasswordSearchSpace("This is a demonstration of how easy an incredibly strong password is to remember")) How to handle database leaks If you have reason to believe that your database has been leaked or otherwise compromised, it is important that your first course of action is removing any access tokens stored in your database. Once you have done that you have to inform your users. Whilst when properly hashed and salted it's extremely difficult / time consuming to find out a user's password it is still a possibility. So you should inform your users of the breach, tell them that their passwords were properly hashed, and they do not need to fear for their passwords immediately. However you should suggest to your users that they change their password either way, just in case. What even is hashing and salting? Hashing has been brought up several times in this tutorial, whilst you do not need to know what it is / does, you might be interested in knowing regardless. I won't be going too far in depth as I simply do not have the knowledge, but the basic idea of hashing is this: When you hash anything, you turn it into a string of characters (or other value) that has no relation to the original input, other than when you hash the original input again, it will always generate the same hash. For example, when you hash the string 'banana' using the sha512 hashing algorithm, it will always yield the output: "F8E3183D38E6C51889582CB260AB825252F395B4AC8FB0E6B13E9A71F7C10A80D5301E4A949F2783CB0C20205F1D850F87045F4420AD2271C8FD5F0CD8944BE3" Now hashing can not be reverted, you can not "unhash" a hash, so in order to verify someone's password you hash it again, and see if the two hashes are the exact same. Now this is great, passwords are safely stored. However there is still more to do, salting. Salting is adding some random data to your password prior to hashing it. This prevents when two users (on the same service, or on others) have the same password, that their hashes are also the same. Meaning if one password is compromised, the other password is not. It is important that a salt is random for every user in your application, not one salt for your entire application. Now you might think we didn't do any salting in the code / tutorial above. This is not true, we just didn't do it ourselves. MTA's passwordHash function actually hashes the passwords and salts it, this salt is then stored in the output hash it self, just before the actual password hash. In the case of bcrypt it actually stores a little bit more info in the resulting hash, but you need not worry about that.
  23. 15 points
    السلام عليكم اليوم جبتلكم سكربت بسيط لان لي زمان ما نزلت سكربتات وهو سكربت حركات GTA V تقريبا كاملة والسكربت انا مش مسوي الحركات ولاكن قمت ببرمجتها للعبة فقط ادري ان السكربت مش متعوب عليه يعني ولاكن في ناس تدور عليه من زمان بعض الصور: ____________________________________________________________________ الباقي جربوه بأنفسكم كـ السقوط النزول من السيارة ركوب السيارة المشي القفز إلخ _____________________________________________________________ رابط التحميل لا إله الا الله محمد رسول الله _________ ملاحظة * السكربت مش مشفر _______________________________ الي يبي يشيل الحقوق بكيفه _________________________________________________ :الاهدائات @#,xiRocKyz @+1HidroNex @Aln3mani @Abu-Solo @[T]|O|[P]George @Mr.Mostafa @#[K]iLLeR<3 @!#NssoR_) @TAPL @KillerX @MARIY @MrKAREEM @Tete omar @MR.GRAND @iMr.WiFi..! @MR.TOUNSI @SuperX @#StrOnG_,) @MR.Mosa @Abdul KariM @Saud'Faisal @N3xT @*AnGeL @Trefeor _________________________________________________ ويلا مع السلامة
  24. 15 points
    السلام عليكم ورحمة الله وبركاته معليش عالجودة (النت %$#@)ء material designصممته بنمط ال البرمجة كلها بلوا 100% مافي تدخلات بلغات ثانية
  25. 14 points
    A poor demonstration of custom face morphing
  26. 14 points
    Hello. Another year is coming to an end, so that means that just like the last year, we have got a new recap and status update post for you. For now, lets summarise all the interesting things that happened this year. 2017 in Recap Late April, we have released Multi Theft Auto: San Andreas 1.5.4. The release introduced an important change and extra security features for server owners, as well as some bugfixes. Around the same time, we have announced a public launch of our Discord server in order to improve communication with our player base. Since then, over 2350 users have visited it and chatted with us. We have also opened regional sections in it to cater to our international users. Then, in October, we have released Multi Theft Auto: San Andreas 1.5.5. Under the hood changes were the highlight of this release, however there was quite a lot of them. Near the release of 1.5.5, we have enabled some 2-factor authentication options for our forums. You can find them in your Forum Account's Settings page. More recently, we have been featured in Polish leading gaming network's (GRYOnline.pl) video about multiplayer mods for GTA series (the video is only in Polish unfortunately, subtitles are not available). Quite a lot of footage was dedicated to history and present of MTA and the mod was cited as one of the major possible inspirations for Rockstar's GTA:Online mode in GTA V. A bunch of interesting MTA:SA-related YouTube videos from this year MTA:SA The Fate Of The Furious - Havana Race (Recreation) [MTA:SA] Character Customization & 3D GUI MTA:SA-SAAF Dogfight Gameplay #2 by [TC]Joseph [UWS] United We Stand 15-13 [CLAY] Clay Team | MTA:SA ClanWar | With Rematch [MTA SA]: Graffiti System MTA - PUBG | BATTLEGROUNDS PRIMEIRA PARTIDA DO CANAL Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 32068 players 2017.11.04 (at 17.30 GMT) Highest recorded number of concurrent unique players 32068 players 2017.11.04 (at 17.30 GMT) Recent number of daily unique players 156247 players 2017.12.26 (Tuesday) Highest recorded number of daily unique players 173585 players 2017.12.23 (Saturday) Recent number of monthly unique players 654399 players November, 2017 Highest recorded number of monthly unique players 668997 players January, 2017 Just like last year, there were new records for unique daily player count fairly recently. MTA:SA Version or series Percentage of players using that version or series as of 26th of December, 2017 1.5.5 97.60% 1.5.4 1.30% 1.5.3 0.30% 1.5.2 0.30% 1.4.x 0.33% 1.3.x 0.17% Very good. Two most recent releases from this year are used by nearly 99% of our player base. The newer the version, the better and more secure it is. *** Work continues on the next release. We have added some new scripting functions such as ones requested in #9562 (contributed by emre1702), as well as did some tweaks to already existing ones. Also did a fix for a memory leaks in the audio part of the Client and a bunch of other changes too. Think that's all for now. Best Wishes for 2018 from the MTA Team!
  27. 14 points
    كيف حالكم ان شاء الله بخير وطلع فيه اخطاء والى اخره Guieditor Online قبل فترة نزل موضوع عن قبل 3 او 4 ايام تقريبا قررت اسوي واحد ببرنامج الفجوال بيسك ويكون دقيق نوعا ما من ناحية الاحداثيات او الى اخره والنتيجة طلعت كالأتي طبعا اللوحة هذي تختار فيها مقاسات شاشتك باللعبة بحيث راح تفتح لوحة ثانية تصمم فيها وتفتح لك قائمة يوم تضغط كلك يمين ( زي السكربت نفسه ) تختار منها الي تبي تسويه نافذة , زر , الخ (Window) طبعا الي بالرصاصي الي الحين بتشوفونه راح تكون النافذة النتيجة بتكون output وبعد ماتضغط كلك يمين وتظهر لك القائمة وتضغط طبعا الي مسويه حاليا فقط النوافذ والزر والباقي بيكون سهل بأذن الله فـ ابي رأيكم اكمل ولا اكنسل ع الفكرة مع السبب واذا كملت ان شاء الله راح اخليه يدعم الدي اكس ويكون شبيه لحق اللعبة بالضبط اعطونا ارائكم واقتراحاتكم تحت وبالتوفيق للجميع
  28. 13 points
    bengines provides custom engine sounds for vehicles. The resource is not focused to be ultra realistic, it is designed to use for casual servers. Not useful for me anymore so sharing with community. Used on old project. Sounds are copyrighted content not owned by me. Features: ready to use, chooses the best engine for vehicle depending on handling! easy to customize & expand for Lua programmers 30 soundpacks for vehicles (buses, bikes, sport cars etc.) stable code with quite high performance used on server with 600 players ALS effect (exhaust flames) Turbo (satisfying whistle and blow-off sounds) Videos: https://streamable.com/n7k40 https://streamable.com/lp14t https://streamable.com/q5e9g Download: Github: https://github.com/brzys/bengines (feel free to send pull requests) Community: to-do For programmers: --[[ Element datas used by resource [array] vehicle:engine - stores basic info about engine type, sound pack etc. (synced) [string] vehicle:type - used for engine calculation, useful for servers. Available: Bus, Truck, Sport, Casual, Muscle, Plane, Boat, Motorbike (synced) [string] vehicle:fuel_type - customized for each engine. Useful for servers. Available: "diesel", "petrol" (synced) You can use setElementData(vehicle, "vehicle:upgrades", {turbo=true, als=true}) to add turbo or ALS. --]] --[[ Exported functions --]] exports.bengines:getVehicleRPM(vehicle) -- returns RPM of given vehicle exports.bengines:getVehicleGear(vehicle) -- returns current gear of given vehicle exports.bengines:toggleEngines(bool) -- true / false, restore GTA engine sounds
  29. 13 points
    I created a complex first person movement script with weapons and custom animations. This is the first version of it.
  30. 13 points
    Events tutorial The reason why I created this topic, is that a lot of people are struckeling with them. In this tutorial I will only discus the very basic of them. If you want more, then there is a list of links at the end with more information. If I made any mistakes in the code, please let me know because I am not going to test every part. What are events? (basic description) Events are something custom added by MTA to make it easier to bring scripting(Lua) closer to our game. If we do not have events, then the only thing we can do is give instructions to our game. But our code will never detect changes in our game. The same question again: "So what are the events?" Events are a way to communicate changes in our game to our scripts (or from our scripts). So for example my little ped(cat) gets ran over by a car. Then I really want to know about that, don't I? When an event activates, I describe this as: triggered (from the word trigger) Full wiki information can be found here: Event_system Before we can use events, what do we need to know? There are two things we need to know: The reason why it is triggered. <What happens?/when something happens?> In MTA this is the eventName of the event. (Example: you <ran over> my ped) Who is the one using the event? The event system in MTA is using elements as base (baseElement). This makes it easier to combine the what/when happens? with the one who is related to it. In MTA this is the source of the event. (Example: you ran over my <ped>) Trigger an event A scripting example: (this is not an official event) local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped triggerEvent("onPedRanOver", ped) In this example, a custom event gets triggered to tell you that my new created ped has been ranOver. The eventName is "onPedRanOver" and the baseElement is ped. local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) In this SERVERSIDE example, I am also adding an extra argument drunkDriver to use the player that ran over the ped. This is not required, but it makes it more complete. See syntax. Syntax bool triggerEvent ( string eventName, element baseElement, [ var argument1, ... ] ) TriggerEvent Receiving triggers Receiving triggers is a bit more complicated, because there are a lot of options for it. You can receive events by listening to them. It is like: You know that something is going to happen but you do not know when. The first step that you have to take is related to this question: "Do I want to receive a custom or not custom event?" Custom events are self created events. They only exist when a scripter makes them. Two lists of NOT CUSTOM EVENTS but default MTA events, serverside and clientside: Server_Scripting_Events Client_Scripting_Events Do I want to receive a CUSTOM event? In case of a custom event, you have to register/enable it first. If you do not enable it and trigger it, you will receive a warning/error about that in your debug console. Syntax bool addEvent ( string eventName [, bool allowRemoteTrigger = false ] ) AddEvent The example below, shows you how to enable a custom event only for trigger events within the same server/client side. addEvent("eventName") -- Is the same as: addEvent("eventName", false) If you put the second argument to false or not fill it in, this means that you can't communicate from the other server/client-side. This option is most likely used for security reasons. Some events shouldn't be able to trigger by the other side For example, worst case scenario: (remote events enabled for a default MTA event) Serverside code: addEvent("onPlayerWasted", true) Clientside code: triggerServerEvent("onPlayerWasted", player, 0, localPlayer, 0, 9, false) OnPlayerWasted If this event is enabled for remote trigger events, then it might be possible to cheating kills/deaths score. Of course, it is not likely that players can run their own clientside code, but it is not impossible in case of not trust able community resources. Enable a custom event for trigger events that crossing sides (From clientside to serverside. From serverside to clientside). addEvent("eventName", true) This event can now be used by remote trigger event functions. See list: Client to server TriggerClientEvent TriggerLatentClientEvent Server to client TriggerServerEvent TriggerLatentServerEvent Enable the event from our previous example: addEvent("onPedRanOver", false) local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) If you do not use cross triggering, then I recommend to use the addEvent function in the same resource as where you are going to trigger from. This makes sure that the event is already added and that you will never receive this kind of error/warning "Event isn't added". If you put it in another resource which hasn't started yet, then after triggering you would still receive that error/warning. Start listening The next step is to add the addEventHandler. This function is used to listen to events. When an event is triggered, this handler(addEventHandler) will call the function you have attached to it, in MTA this function is called the handlerFunction. Syntax bool addEventHandler ( string eventName, element attachedTo, function handlerFunction [, bool getPropagated = true, string priority = "normal" ] ) AddEventHandler Resource 1 addEvent("onPedRanOver", false) local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) Resource 2 function handlerFunction () end addEventHandler("onPedRanOver", root, handlerFunction) The first 3 arguments, the require ones: eventName attachedTo handlerFunction Making sure that the addEventHandler options are correct set-up. Resource 1 addEvent("onPedRanOver", false) local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) Resource 2 function handlerFunction () end addEventHandler("onPedRanOver", root, handlerFunction) There are two conditions for an eventHandler to call the handlerFunction. 1. The event has to be exactly the same. In this case the event "onPedRanOver" is the same in both resources. 2. In both functions, triggerEvent and addEventHandler is an element being used. This element has to be exactly the same. (from where you trigger as well as where you receive) <OR> The triggered element from resource 1, has to be a CHILD of the element in resource 2. The root element is the very top layer of the MTA element structure. It will accept all elements you want to use for your events. See the element tree: If you do not understand the element tree please read this page: Element_tree Source variable The source of an event is the element that triggers the event. This variable isn't passed as an parameter, but it is predefined. This means that it is already created before hand. Some predefined variables do only exist under special conditions. The source variable is one of those, it is a hidden and local variable which is only available when a function is called by an event. List of predefined variables. addEvent("onPedRanOver", false) -- local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) function handlerFunction (drunkDriver) iprint(source) -- ped element end addEventHandler("onPedRanOver", resourceRoot, handlerFunction) In this example the ped is the source. See how those two code blocks are connected: addEvent("onPedRanOver", false) -- local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) function handlerFunction (drunkDriver) iprint(source) -- ped element end addEventHandler("onPedRanOver", resourceRoot , handlerFunction) resourceRoot In some examples, you see people use the resourceRoot instead of the root element for their addEventHandlers. The resourceRoot is an element created by a resource. This element holds all elements of that resource as (in)direct children. In the example above, the resourceRoot as baseElement will not work, because there are two resources. Each resource has it's own resourceRoot element. The resourceRoot is accessible with the same keyword: resourceRoot, but if you were to inspect the element in multiple resources, then the user data (element identifier) value is not the same. outputChatBox(inspect(resourceRoot)) If we were to put everything in one resource, then it would work: 🎉 addEvent("onPedRanOver", false) -- function handlerFunction () end addEventHandler("onPedRanOver", resourceRoot, handlerFunction) -- local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) In case of remote triggering, the resourceRoot in serverside and clientside is considered the same.(As long as they are part of the same resource) Why/when would we use resourceRoot? 1. Limit eventHandlers to the resource elements If you have 1000 markers in your server. One of the resources is for example a trucker mission, where you can get money by hitting markers. The resourceRoot element will make sure that the onMarkerHit event will only trigger for markers created by that resource. addEventHandler("onMarkerHit", resourceRoot, function () -- source element is the marker end) OnMarkerHit 2. Another benefit is that you are able to re-use the same eventNames. Resource 1 addEvent("onPedRanOver", false) function handlerFunction () end addEventHandler("onPedRanOver", resourceRoot, handlerFunction) -- local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) Resource 2 addEvent("onPedRanOver", false) function handlerFunction () end addEventHandler("onPedRanOver", resourceRoot, handlerFunction) -- local ped = createPed( 120, 5540.6654, 1020.55122, 1240.545 ) -- my ped local drunkDriver = getRandomPlayer() triggerEvent("onPedRanOver", ped, drunkDriver) These two resources do use the same event, but will not trigger each other their addEventHandlers. Warning: If root was used, then they will!!!! ;@ Lets cross triggering with resourceRoot! Clientside triggerServerEvent("example", resourceRoot) Serverside addEvent("example", true) -- second argument is true! cross triggering enabled! addEventHandler("example", resourceRoot, function () end) getPropagated In this bigger example we will be talking about the option getPropagated. If this option is disabled, it will not detect children any more. Keep reading! After that start code scanning from A, to B and then to C. Syntax addEventHandler bool addEventHandler ( string eventName, element attachedTo, function handlerFunction [, bool getPropagated = true, string priority = "normal" ] ) Example: Clientside -- A triggerServerEvent("onClientPlayerLoaded", resourceRoot) -- trigger an event to serverside --------------------------------------- -- C addEvent("onResponseServer", true) -- first listener addEventHandler("onResponseServer", resourceRoot, function () outputChatBox("getPropagated enabled") end, true) -- getPropagated true by default. -- second listener addEventHandler("onResponseServer", resourceRoot, function () outputChatBox("getPropagated disabled") end, false) -- getPropagated is false. Serverside -- B addEvent("onClientPlayerLoaded", true) -- second argument is true! cross triggering enabled! addEventHandler("onClientPlayerLoaded", resourceRoot, function () --[[ client is a predefined variable, which represents the client/player that communicates with the server More information about predefined variables: https://forum.mtasa.com/topic/33407-list-of-predefined-variables/ ]] triggerClientEvent(client, "onResponseServer", resourceRoot) -- first trigger event local element = createElement("randomElement") -- making a randomElement triggerClientEvent(client, "onResponseServer", element) -- second trigger event end) How does this this code works? A. When a client his code has been started, it will execute a triggerServerEvent. (It doesn't wait for any other clientside files to be loaded) B. The server receives the event. And sends two triggerClientEvents back: The first one is using the resourceRoot as baseElement. The second one is using a randomElement as baseElement. Both are using the event "onResponseServer" C. There are two addEventHandlers listening to the event: "onResponseServer" The first one is using getPropagated and the second one is not using getPropagated. The randomElement that is created, is by default an indirect child of the resourceRoot of the same resource. What will happen? When firing the first trigger event, both listeners will call their handlerFunction. But when firing the second trigger event, only the first listener will call it's handlerFunction. The randomElement is an indirect child of resourceRoot, but because getPropagated is disabled it will not call it's handlerFunction. Other tutorials related to this one: See also this tutorial about deeper limiting event ranges within your resource and reducing addEventHandlers https://forum.mtasa.com/topic/100069-tut-addeventhandler-on-a-group-of-elements-small-tutorial/ More information Full wiki information: Event_system A list of more information about triggering events: (Client to client / server to server) TriggerEvent Client to server TriggerClientEvent TriggerLatentClientEvent Server to client TriggerServerEvent TriggerLatentServerEvent A list of more information about receiving events: AddEvent AddEventHandler RemoveEventHandler Two lists of MTA events, serverside and clientside: (warning: not custom events) Server_Scripting_Events Client_Scripting_Events Cancel events CancelEvent WasEventCancelled (warning: custom events ONLY) GetCancelReason (Server only) Cancel latent events and their status GetLatentEventHandles CancelLatentEvent GetLatentEventStatus
  31. 13 points
    كيف حالكم عساكم بخير , مثل ماهو واضح بالعنوان سويت سكربت بسيط تستفيدون منه مع وظائف مفيدة السكربت مسويه من شهر ونص تقريبا وحبيت اليوم اطرحه xml وهو بديل للسكل لكن يحفظ المعلومات في ملف ونخش على الوظائف لكن حبيت افصل الوظائف عشان تكون سهلة الاستخدام وماتلخبط executeSQLQuery طبعا اقدر ادمجهم بوظيفة وحده مثل ملاحظة جميع الوظائف استخدامها يكون في السيرفر سايد والسكربت مشفر فقط لحفظ الحقوق https://up.top4top.net/downloadf-968v8aeg1-zip.html : الرابط طبعا سويت سكربتين واستخدمت اغلب الوظائف فيهم السكربت الاول عبارة عن رسالة ترحيب تحطها بنفسك وبس تدخل السيرفر تظهر لك طريقة الاستخدام موضحة في السكربت https://up.top4top.net/downloadf-968zk7wb2-zip.html : الرابط السكربت الثاني عبارة عن اي كلمة تكتبها بالشات راح يحفظها وتقدر تتحكم وطريقة الاستخدام موضحة في السكربت https://up.top4top.net/downloadf-968jcuf83-zip.html: الرابط ملاحظة : ملف الاكس ام ال راح يكون سيرفر سايد بمعنى انه ماراح يظهر للاعب الي يدخل السيرفر او الى اخره الملف بيظهر في مجلد السكربت فقط يعني كأنك مسوي داتا بيس خاصة ماراح تظهر الا بالسكربت اي استفسارات او ملاحظات حط ردك تحت , اتمنى السكربت نال اعجابكم ولاتنسونا من صالح دعائكم وهذا والله اعلم , والسلام عليكم ورحمة الله وبركاته
  32. 13 points
    اليوم بشرح الوضائف الجديدة الخاصة بالاكاونت { getAccountByID , getAccountID , getAccountIP , getAccountsByData , getAccountsByIP , setAccountName } بسم الله نبدأ x[ getAccountByID ]x شرح الوضيفة \ Explain the function This function returns the account with the specific ID. / تقوم الوضيفة بإرجاع الحساب عبر الايدي او المعرف الخآص به السانتكس \ Syntax account getAccountByID ( int id ) id = The ID to get account from / الآيدي الي تبي تجلب فيه الحساب عن طريقة العائدات / Returns Returns account associated with specified ID. Returns false if invalid arguments were specified or there is no account with this ID. / ارجاع الحساب المرتبط بالمعرف او الإيدي ,إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble addCommandHandler("getAccount", -- نسوي امر جديد function (player, cmd, id) id = tonumber(id) -- نجلب الايدي من الامر local account = getAccountByID(id) -- نجيب الحساب من الايدي if account then -- نتحقق ان الحساب موجود او لا outputChatBox("The name of the account with that ID is: "..getAccountName(account), player) -- اخراج نص بـ أسم الحساب الي جبناه else -- اذا الحساب مو موجود outputChatBox("There is no account with this ID.", player) -- اخراج نص بـ ان لا يوجد حساب يمتلك هذا الاي دي end end) x[ getAccountID ]x شرح الوضيفة \ Explain the function This function retrieves the ID of an account. / تستخدم هذه الوضيفة لجلب الآيدي او المعرف الخاص بالحساب السانتكس \ Syntax int getAccountID ( account theAccount ) theAccount = The account you wish to get the ID of. / الحساب الذي تريد جلب الآيدي او المعرف الخاص به العائدات / Returns Returns a int containing the account's ID, false if the account does not exist or an invalid argument was passed to the function. / ارجاع رقم انتقر او رقم صحيح يحتوي ع ايدي الحساب المُدخل, إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble function outputOnLogin ( previous_account, current_account, auto_login ) --when a player logs in / لما الاعب يسجل دخول outputConsole("["..getAccountID(previous_account).."] "..getAccountName(previous_account).." Logged into ["..getAccountID(current_account).."]"..getAccountName(current_account)) -- announce it into the console / استخراج نص للكونسل بـ أيدي حسابة القديم و الجديد end addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) --add an event handler / اضافة حدث x[ getAccountIP ]x شرح الوضيفة \ Explain the function This function retrieves the IP-address of an account. / تستخدم هذي الوضيفة لجلب عنوان الايبي ادريسس للحساب المحدد السانتكس \ Syntax string getAccountIP ( account theAccount ) theAccount = The account you wish to get the IP of. / الحساب الذي تريد جلب الايبي ادريسس الخاص به العائدات / Returns Returns a string containing the account's IP, false if the account does not exist or an invalid argument was passed to the function. / إرجاع سلسلة نصية تحتوي على عنوان الايبي ادريسس للحساب المُدخل, إرجاع قيمة منطقية بـ فولس إذا كان الحساب غير موجود مثآل \ Examble function outputOnLogin ( previous_account, current_account, auto_login ) --when a player logs in / عند تسجيل دخول الاعب outputDebugScript(getPlayerName(source).."logged into his account with IP "..getAccountIP(previous_account)) -- announce it into the debugscript / إخراج نص للدي بق بـ عنوان الاإيبي ادريس للحساب إو الاعب end addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) --add an event handler / اضافة حدث x[ getAccountsByData ]x شرح الوضيفة \ Explain the function This function returns a table containing all accounts with specified dataName and value (set with setAccountData). / تقوم هذه الوضيفة بإرجاع جدول يحتوي على جميع الحسابات التي تمتلك على داتا محددة ( setAccountData ) :تم تعينها بإستخدام وضيفة السانتكس \ Syntax table getAccountsByData ( string dataName, string value ) dataName = The name of the data / اسم الداتا value = The value the dataName should have / اشتراط ان تكون قيمة الداتا العائدات / Returns Returns table containing the accounts associated with specified value at dataName. Returns false if invalid arguments were specified. / جدول يحتوي على الحسابات المرتبطة بالقيمة المحددة في الداتا, إرجاع قيمة منطقية بـ فولس إذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("accountsbydata", function (player) -- add Command / إضافة امر local account = getPlayerAccount(player) -- Set the variable to the player account / تعين المتغير بـ حساب الاعب setAccountData(account, "test", "hello") -- Set the data and the value set on the account / وضع داتا معينة وقيمة لها على الحساب local accounts = getAccountsByData("test", "hello") -- Set the variable to the table containing the accounts associated with dataName and valueData / تعين المتغير بجدول يحتوي على الحسابات المرتبطة بالداتا والقيمة الخاصة بها outputChatBox(getAccountName(accounts[1]), player) -- The output text that contains the first account in the table / إخراج نص يحتوي على إول حساب في الجدول end) x[ getAccountsByIP ]x شرح الوضيفة \ Explain the function This function returns a table containing all accounts that were logged onto from specified IP-address. / تقوم هذه الوضيفة بإرجاع جدول يحتوي على كافة الحسابات التي تم تسجيلها من عنوان الإيبي ادريس المحدد السانتكس \ Syntax table getAccountsByIP ( string ip ) ip = The IP to get accounts from / الإيبي ادريس المراد الحصول على الحسابات المسجلة به العائدات / Returns Returns table containing the accounts associated with specified IP-address. Returns false if invalid arguments were specified. / تقوم هذه الوضيفة بإرجاع جدول يحتوي على الحسابات المرتبطة بعنوان الايبي ادريس المحدد, إرجاع قيمة منطقية بـ فولس اذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("getAccounts", -- add Command / إضافة امر function (player, cmd) local ip = getPlayerIP(player) -- Set the variable to the player IP / تعين المتغير بـ إيبي الاعب local accounts = getAccountsByIP(ip) -- Set the variable to the table containing the accounts associated with IP / تعين المتغير بجدول يحتوي على الحسابات المرتبطة بالإيبي المسجل بها outputChatBox("You have " .. #accounts .. " accounts.", player) -- Output text in the number of recorded accounts in player IP-address / إخراج نص بعدد الحسابات المسجلة في إيبي ادريس الاعب end) x[ setAccountName ]x شرح الوضيفة \ Explain the function This function sets the name of an account. / تقوم هذه الوضيفة بتحديد اسم الحساب المحدد السانتكس \ Syntax bool setAccountName ( account theAccount, string name [, bool allowCaseVariations = false] ) theAccount = The account you wish to change the name./الحساب الذي تريد تعين الاسم له name = The new name.. / الإسم الجديد للحساب allowCaseVariations = Whether the username is case sensitive (if this is set to true, usernames "Bob" and "bob" will refer to different accounts) العائدات/ Returns Returns a true if the account name was set, false if an invalid argument was specified. / تقوم هذه الوضيفة بإرجاع قيمة منطقية بـ ترو إذا تم تعين اسم الحساب, إرجاع قيمة منطقية بـ فولس اذا تم تحديد ارقمنات غير صالحة مثآل \ Examble addCommandHandler("changeaccountname", function(player, _, oldname, newname) -- add Command / اضافة امر if not oldname or not newname then -- Verify that the oldname and newname value exist / تحقق من وجود قيمة oldname و newname return end local account = getAccount(oldname)-- Set the variable to the account whose name will be changed / تعين المتغير بـ الحساب المراد تغير اسمه if not account then -- Verify that the specified account exists / تحقق من وجود الحساب المحدد return end setAccountName(account, newname) -- Set the specified account name to the newname / وضع إسم الحساب المحدد إلى الـ newname end) الحمد لله وصلنآ إلى نهاية الشرح إتمنى انه اعجبكم وماكان صعب عليكم الإهداءات/ Dedications @KhaledAlamri @#َxLysandeR @!#NssoR_) @#_iMr,[E]coo @#StrOnG_,) @iMr.WiFi..! @بويكا @Master_MTA @N3xT @#DRAGON!FIRE @[T]|O|[P]George @MrKAREEM @ccz @killerProject @#DesTroeyR @Rakan# @الباقي بالقلب
  33. 12 points
    Draw distance v1.0.2 This resource improves the draw distance of all your resources that make use of map files. It makes your maps 10x more beautiful in my opinion! Greatly improves the draw distance of map objects Maxed out the draw-distance for peds and vehicles. (See MTA settings > video: Render vehicles always in high detail + Render peds always in high detail ) Multi-resources support (this effect is applied on every mapRoot element) Parallel loading method is used, but the loading speed is in that case reduced to improve performance. The effect is not only applied on resources that are starting, but also resources that are already running. Download here This resource is uncompiled! Repository: https://gitlab.com/IIYAMA12/draw-distance Video - Created by @Anx1ty Comparison Starting at 200 units distance 400 units distance (this is the distance where a lot of objects will be unloaded, but in this case switched with lowLOD objects) And even on 600 units distance, it is technically visible -> (while the fog is slowly eating it up... ) Download here Can all hardware run this? --> I have no idea... most likely 😷. Just give it a try.
  34. 12 points
    Olá pessoal. Fiz um vídeo bem detalhado sobre os painéis CEGUI, abordando algumas das principais dúvidas e também algumas propriedades que podem ajudar muito na hora de criar um painel GUI. Recomendo que assistam com fones de ouvido, ou então que ativem as legendas no YouTube. Críticas, sugestões, opiniões, perguntas relacionadas ao vídeo, podem fazer por aqui ou então deixar nos comentários do vídeo. (Deu muitíssimo trabalho de produzir o vídeo, deixe seu like neste post e no vídeo. Se puder, se inscreva no canal e acompanhe a página Lord Henry Entertainment no facebook.) Links e funções que aparecem no vídeo em ordem de aparição: http://static.cegui.org.uk/docs/0.8.7/ guiGetScreenSize guiCreateWindow guiCreateButton http://static.cegui.org.uk/static/WindowsLookProperties.html guiSetProperty http://static.cegui.org.uk/static/WindowsLookProperties.html#FrameWindow http://static.cegui.org.uk/static/WindowsLookProperties.html#Button isMouseOnGUICloseButton Standard_GUI_Font_Names guiSetEnabled guiSetAlpha guiEditSetReadOnly guiEditSetMasked Tenham todos uma boa semana.
  35. 12 points
    السلام عليكم رجعت بعد فترة طويلة من تنزيل المودات وبما ان رمضان قرب فحبيت اسوي سكربت بسيط للسيرفرات والسكربت مسويه علسريع علشان لاحد ينتقده فيديو للمود : معليش علي جودة الفيديو مب حلوة والحين المود انه يجيب الفانوس مع الاغنية والتأثيرات كل دقايق الي انت تحددها من ملف c.lua في اول المود حاط متغير اسمه mins غيره لعدد الدقايق الي تبيه انت ولا نطول عليكم والسكربت غير مشفر للأفادة رابط تحميل المود : رمضان كريم علي الكل ____________________________________________________ الاهدائات : @KillerX @SuperX @Abdul KariM @!#NssoR_) @Rakan# @TAPL @DABL @Kareem Amer @ALBANDER. @iMr.WiFi..! @#Soking @Master_MTA @#StrOnG_,) @NX_CI @[T]|O|[P]George @ibrahim# @[AcM] - Major . @#,xiRocKyz @+Source|>
  36. 12 points
    Hi! I am Ciastuuś(Ciastuus) and today I present the construction system, which is visible in the film below. One day I came up with the idea of creating something that was not there. Namely, we wanted to create a server based on Rustie, but due to lack of time and limitations, we created a demonstration script that will exist on the server that we will open if we find the time. What can the script do? We will answer this question! Building on a designated area Creating all available elements visible in the video Removing manually created items Destroying elements by hitting a vehicle or shooting it with a gun And many more in subsequent versions! The visible zone has been modeled in its entirety, and checking whether an element is in the zone is part of the script. Same as effects. The effects are part of modeling and scripting them. If you have an idea what to add, please write in a comment, thank you! Credits: * Ciastuus(me) * Vagos * x0nx * xS3nd * Kavp * ... more
  37. 12 points
    This script has been stolen from a server by taking the uncompiled client.lua from the client resources directory while playing there. As this happens to be my server, I took this opportunity to publish the script on community rather than having someone else show off with work that isn't theirs. Said server has been running this script for a couple of years already. You can download the resource at https://community.mtasa.com/index.php?p=resources&amp;s=details&amp;id=15749 now (open source). Topic locked because this practice isn't allowed on the forums Arabic translation (not by me): هذا السكربت تمت سرقته من السيرفر الخاص بي عن طريق سرقة ملف الكلاينت الغير مشفر من مجلد المودات أثناء اللعب هناك, وبالصدفة هذا السكربت خاص بسيرفري لذلك استغليت الفرصة وقمت بنشر السكربت في الكوميونيتي بدلاً من تظاهر شخص بعمل ليس له, هذا السكربت يعمل بالسيرفر لعدة سنين حالياً https://community.mtasa.com/index.php?p=resources&amp;s=details&amp;id=15749 : ( تحميل السكربت ( مفتوح المصدر .هذا الموضوع مغلق لأن هذا التصرف ممنوع في المنتدى
  38. 12 points
    بسم الله الرحمن الرحيم السلام عليكم ورحمه الله وبركاته.. كيفكم جميعاً؟ ان شاء الله تكونون طيبين [UIKit] راح يتم الإعلان عن مكتبة واجهة المستخدم الحديثة تحت أسم -: التي هي من تطوير عربي بالكامل تحت طاقم مكون من 3 أفراد الا وهم @iMr.WiFi..! @H25 @#,xiRocKyz المكتبة تم تطويرها خلال اسبوع.. وتعتبر أقل مكتبة استهلاكاً للرام والذاكرة وهذا ماحرصنا عليه في المكتبة وكذلك التصميم الجيد للمكتبة الذي يعطي جمالية للمستخدم المكتبة ولا ننسى التأثيرات الجيدة -: وهنا صور توضح المكتبة وخصائصها وكذلك بعضاً من مميزاتها -: وهنا فيديو على اليوتيوب يظهر تأثيرات المكتبة -: (هذه هي كائنات المكتبة الحالية (سيتم أضافة الكثير مستقبلاً سيتم أضافة جميع كائنات الجيو في المكتبة بشكل فريد من نوعه بأذن الله تعالى.. وما يميز مكتبتنا بقلة الأستهلاك أو حتى يمكن الاطلاق عليها بعديمة الأستهلاك ..وفي الختام نتمنى ان تضعو أجابةً للأستطلاع اعلاه وكذلك وضع الاقتراحات سيتم نشر المكتبة في القريب العاجل
  39. 11 points
    Currently I'm working on a new map editor with more features and a more user friendly UI however a major thing I'd like to see is what you (The Community) want to see added in the editor. If you respond with a feature request please state the name of the feature or tool as well as a brief description; I'll be posting some screen shots of what the new tool will look like as soon as I have the basic functionality done.
  40. 11 points
    [TUT] Scaling DX The reason why I am creating this topic, is because there are a lot of people asking this question: And to be honest there is no best practice for. But here you have my recommendation as guidance for display them the ~s~a~m~e~ for all screen formats. There are two important factors while dealing with screen formats 1. Pixel density Indication: PPI(Pixels Per Inch) and some also use the term DPI(Dots Per Inch) They do not have to be the same while talking about printing stuff. This indication tells us about how many pixels are used per inch. Which more or less tells us how sharp/smooth things like text can be looking. PPI doesn't really play a big role, but to display something nicely you need enough pixels to display it. Else it will be either too small or too crispy. So be careful to not scale things (especially text) too small. 2. Display aspect ratio Wiki The difference between resolution X and resolution Y as a ratio. A list of common ratios: 4:3 5:4 3:2 16:10 16:9 So for example if we take: fHD: 1920x1080 Which has the ratio 16:9 that is calculated like this: 1920 / 16 = 120 120 * 9 = 1080 Scaling without ratio Before I am going to explain any of this, I am going to ask you an important question: Like this: (vertical) ▮ Or horizontal? ▅ I assume most people would agree to play MTA horizontal, else you are probably reading a book or document. p.s If you play MTA on a vertical screen, then we developers do not like you at all, sorry. So what does this tell us? You can assume that the X-resolution is never going to be smaller than the Y-resolution. Useful? You will figure it out. Doing the scaling Note: This part is ABOUT SCALING and not positioning. So what we are going to do is: Calculating a scale which can display the same DX on multiple screen formats > without messing with the ratio. Example: A computer runs MTA at a resolution of 1920 x 1080. Lets define that! local devScreenX = 1920 local devScreenY = 1080 If this code is used by a different pc, we also need to know on which resolution it is running: local screenX, screenY = guiGetScreenSize() For the next step we have to look at this screenshot: I have cut out of the wide-screen format a square. Squares have the ratio 1:1, which means that we have removed our ratio difference from this screen resolution. It is very easy to do, as our Y * Y resolution makes exactly that beautiful square! The next thing we have to do is creating our scaling value. This value is required for adjust our resolution values so that they match to every screen format. So to use our ratio 1:1, we use the Y resolution to achieve that: local scaleValue = screenY / devScreenY And as last we can create a rectangle shape that is displayed at the center of every screen format, perfectly! local devScreenX = 1920 local devScreenY = 1080 local screenX, screenY = guiGetScreenSize() local scaleValue = screenY / devScreenY addEventHandler("onClientRender", root, function () -- create a scaled size local sizeX = scaleValue * 300 -- 300px local sizeY = scaleValue * 50 -- 50px -- get the center of the screen local centerX = screenX / 2 local centerY = screenY / 2 -- calculate the starting point of the rectangle local startRectangleX = centerX - (sizeX / 2) local startRectangleY = centerY - (sizeY / 2) dxDrawRectangle ( startRectangleX, startRectangleY, sizeX, sizeY, tocolor ( 255, 255, 255, 255 ) ) end) Lower limit What if we have a resolution of 800x600? And the text is getting too small? Making sure that the pixel density is OK, is very important. So to counter that we have to make sure that the text is not getting too small. Our development Y resolution is 1080 pixels. And we are dealing with an Y resolution 600 pixels. The first thing we are going to look at, is what the scale is going to be at that point. 600 / 1080 = 0.55555555555555555555555555555556 It is not very nice to have your text scaled to 55.5% of the original size, when having low resolution already. But without scaling, the DX stuff might fill up the entire screen and that is just as bad. So what we now need is a limit, in this case a lower limit. scaleValue = math.max(scaleValue, 0.65) The math.max function returns the highest value of all the arguments you put in to it. In this case it contains the: scaleValue: 0.555 And the lower limit of: 0.65 This will make sure that the DX stuff is not getting smaller than 65%. This might make text read able for a 800x600 resolution.
  41. 11 points
    ServerIP: Our Discord: https://discord.gg/aR4kGxY OUR FORUM: https://forum.redcountyrp.net/ TEAMSPEAK: 116.202.33.23 Sky Roleplay is made to create the ultimate roleplay experience. Sky Roleplay is a medium/heavy roleplay server, based in Red County. Sky Roleplay has many custom interiors, unique mappings, many unique scripts and last but not least, realistical roleplay experience. Features: Vehicle Sounds Mappings Interiors ETC.. ______________________________________________________________________________________________________________________________________________________________ We Also have host alot of different events for the players with rewards and try to spice up the player experience. Screenshots from the server: DMV: FD: Hospital: The Montgomery Park: The Town Hall:
  42. 11 points
    السلام عليكم ورحمة الله وبركاته اتهامات سرقة السكربتات بدون دليل ممنوعة, لاحظت في الفترة الأخيرة اتهامات بين أعضاء المنتدى بخصوص نشر سكربتات مسروقة وما شابه ولذلك اذا توفر لديك الدليل الكافي بأن السكربتات مسروقة وليست ملكاً للشخص الذي قام بنشرها قم بالتواصل معي على الخاص وسيتم التعامل مع الموضوع. * ملاحظة: ليست لدينا أي صلاحيات تجاه السيرفرات التي تستعمل سكربتات مسروقة, فقط السكربتات التي تم نشرها على هذا المنتدى. تحياتي لكم
  43. 11 points
    السلام عليكم ورحمة الله وبركاته كيف الحال شباب باذن الله تكونو بخير المهم ما اطول عليكم اليوم مثل مافي العنوان اصدار اول مكتبة عربية مفتوحة المصدر المكتبة خاصه بي المهم المكتبه خصائصها: 1-انشاء نافذه 2-انشاء زر 3-انشاء سكرول بار 4-انشاء-بروجرس بار 5-انشاء ايديت بوكس 6-انشاء ميمو 7-انشاء ليبل 8-انشاء جريد لست(ملاحظة الجريد لسا حاليا لا تدعم السكرول بار الافقي ولكن تدعم الراسي وكما انها لا تتوفر فيها كم خاصيه)ا 9-انشاء شيك بوكس 10-انشاء راديو بوتون 11-انشاء صورة 12- انشاء تاب بانل 13-فنكشناتها مماثله لفنكشنات اللعبه تقريبا مثال guiCreateWindow-->gui dxCreateWindow-->dx 14-افكت للزر 15- المكتبة تتوفر على نظام تحديث يمكنك ان تجعل التحديث تلقائي كل 5 ايام يتم التحقق من نزول اصدار جديد او لا هذا الطبيعي اذا اردت التغيير على الاعدادات يمكنك ذلك عن طريق الملف update/update.lua وباقي الخصائص اكتشفوها مع نفسكم الملفات غير مشفره للافاده عيوبها ملاحظه (اخطط لدعمها في المستقبل باذن الله هيا وجميع الالمنتات الباقيه)ل 2-لا تدعم كومبو بوكس كما قلت اعلاه 4- لا تدعم سكرول بان لا ارى له اهميه لذلك لا اخطط لاضافته ----------------------------- لتحديث المكتبة اكتب في اف 8 updateM.M فقط ----------------- في حالة اكتشاف اي بق او اي اقتراح للتطوير من اداء المكتبة يرجى الرد هنا في حالة اردت معرفة الفنكشنات المتاحه للعمل عليها فقط ادخل على meta.xml وستجدني واضع لها export كلها في حالة اردت معرفة طريقة استخدامها فقط ادخل الى الملف elements واضغط على الملف المراد معرفة الفنكشن الذي يحتويه --------------------------------------------- لتحميل المكتبة من github-----> https://github.com/Master-MTA/M.M ستجد زر اخضر اسمه clone or download اضغط عليه وحمل بصيغة zip ------------------------------------- اريد من شخص ان ينشا صفحه في الويكي باسم المكتبه M.M ويضع فيها الفنكشنات --------------------------------- ملاحظه سيتم توفير محرر خاص بالمكتبة باذن الله في المستقبل ولكن سيكون مدفوع وغير مجاني محرر اعني به مثل guiEditor ------------------- @KillerX @N3xT @SuperX @MR.TOUNSI @all مب عارف اجيب اسماءكم بالمنتدى كله حاطط تشكيله باسمه ههه ولا عبد الكريم ولا احد عارف اكتبه @!#NssoR_) يا ليت لا تنقله لقسم المساهمات لان قسم العربيه هو اكثر شي مشاهده ويا ليت تثبته لفتره +_+
  44. 11 points
    Download: https://community.mtasa.com/?p=resources&s=details&id=15260 The best vehicle reflection shader around, unique: takes no FPS toll. It looks close to real ENB and it has rewritten effects which uses techniques to avoid performance toll like all circulating shaders suffer from; f.e, it creates reflection based purely on GTA default surface materials. @Ren_712, the most recognized FX/shader developer around MTA, assisted with rewriting the effect not long ago, but has never released it. Until now, it was a resource private to me based on a custom order I gave to Ren_712. It took weeks of development to get it to it's current appearance and a few months to perfect it, as it's tricky to try recreate ENB with MTA FX and make the reflection appear more qualitative than existing ones, while also scrapping any performance toll. I may be claiming it's ''the best'' around, but it's for you to judge: https://imgur.com/a/U8MLN. I am convinced that it is due to several factors: it looks deeper/has a qualitative reflection (almost) simulating ENB, eliminating GPU performance toll while doing that (the appearance) even better than preceding released shaders (which did take a toll), making it the ultimate combination. Open spoiler for sample images of reflection effect: Some will like the ENB resemblance, and others will find the reflection too shiny or deep. You can modify that easily and adapt it to your wishes using the variables in client_carshader.lua. The intensity, brightness, deepness and visibility of the reflection can be tweaked in there, so you can make a ''custom'' version just like ENB's get edited and released as custom ENB. You can make it look differently (more than just less prominent effect) while retaining the optimized techniques it uses against lag. It's possible to simulate the lightest possible shader that doesn't look ''extremely reflective''.
  45. 11 points
  46. 11 points
    وعليكم السلام ورحمة الله وبركاته الله يبارك فيكم جميعاً, وعقبالكم إن شاء الله وأسأل الله أن أكون عند حسن ظنكم, تحياتي ينقل للقسم العام
  47. 11 points
    Hello, today I'm honored to present you my latest, biggest and coolest project a program called mini admin which allows you to control your MTA directly just log in to your console account this project took from me 20 days, 1600 line of codes (LUA & C#). and have fun with the features, A tutorial video : Tips: 1. don't change the resource name. 2. give the resource admin permissions ( resource.miniadmin ). 3. If you want to edit the groups etc.. ( meta.xml ). 4. If you have a bug or an idea feel free to PM me. Download: http://www.mediafire.com/file/9x2k4dbzllejs0e/C%23.zip Have a nice day.
  48. 11 points
    يسعدني بانك من اول الردود لى موضوعي شكرا على تعليق الرائع من انسان اروع @Master_MTA @!#NssoR_) @#[K]iLLeR<3 @TAPL @KillerX @MR.Mosa @ععيونككء اخخر امممأليء ^ @#SnpêŘ @Tete omar @*AnGeL @iMr.WiFi..! @Abu-Solo @MR_Mahmoud @N3xT @Trefeor @Rakan# @Dr.Marco
  49. 10 points
    Lua tutorial for absolute beginners This tutorial aims to teach the Lua scripting language to those with 0 previous experience with programming / scripting. This guide will start with explaining some Lua concepts, and will later on move to explaining MTA:SA specific concepts. Table of contents: Lua Scripts Variables Data types Operators If statements Functions Return values scopes & locals For loops Tables Iterators (pairs/ipairs) Callbacks Anonymous functions MTA Server & Resources Server vs client MTA functions & wiki Elements (userdata) Command handlers Event handlers predefined globals server <-> client communication Now what? Lua This part of the tutorial discusses Lua itself. No MTA-specific concepts will be discussed here. Scripts The Lua scripting language is a language which is interpreted by a "Lua interpreter". MTA:SA's resources use such an interpreter to run Lua code. For the beginning of this tutorial you can use the online Lua interpreter available on https://www.Lua.org/demo.html. Any code in the Lua part of the tutorial can be run on this website. Lua is written in "plain text". This means it exists of regular characters like any other text you are writing. To edit Lua files you will require a text editor. You could use Notepad, but there are many far better alternatives. My personal favourite is Visual Studio Code, but there are many other good options, to name a few: Atom, sublime text, notepad++ Lua files are usually saved with the .Lua file extension Variables The first concept we're going to discuss is variables. Variables allow you to store a value in your code. For example: x = 10 print(x) print(x) will output the value of the x variable. We will get into what exactly print is later in the tutorial. Variables can have any name you want, as long as you follow some specific rules. variable names must start with a letter (lower or upper case), or an underscore (_) variable names may contain letters (lower and upper case), numbers and underscores. x = 10 y = 20 z = 30 print(x) print(y) print(z) The convention in Lua is to name your variables in "camelCase". This means if a variable exists of multiple words you start every word with a capital letter, except for the first one. camelCaseVariable = 5 Data types So far we've seen variables used to store numeric values, but there are many different types of data Lua can handle. These are: number Any numeric value string A piece of text, a string is surrounded by " or '. For example "Hello world" or 'Hello world' boolean A boolean is a data type that has only 2 options, true and false. nil nil is a value indicating nothing. It's the absence of a value. (Not the be confused with 0) table Tables will be discussed later in the tutorial userdata Userdata will be discussed later in the tutorial function Functions will be discussed later in the tutorial thread Threads are out of scope for this tutorial and won't be discussed So we can use these different data types, and store them in variables: numberVariable = 10 stringVariable = "Hello world" booleanVariable = true nilVariable = nil Operators Operators are symbols in Lua which can be used to do "things" with variables. Here's a list of operators and an example for each: + operator Adds two values together x = 10 + 10 print(x) y = 20 print(y) z = x + y print(z) - operator Subtracts a value from another value x = 10 - 10 print(x) * operator Multiplies two values x = 10 * 10 print(x) / operator Divides a value by another value x = 10 / 10 print(x) % operator This is the "modulo" operator. This will divide a value by another, and return the leftover. x = 10 % 4 print(x) The result of this is 2 and operator The and operator will return true if both variables are "truthy". Otherwise it returns false (A "truthy" value is anything except for false and nil) x = true and false print(x) y = true and true print(y) or operator The and operator will return true if one of the variables are "truthy". Otherwise it returns false x = true or false print(x) y = false or false print(y) == operator The == (equals) operator will return true if both of the variables are the same. Otherwise it returns false x = "hey there" == "hello there" print(x) y = 150 == 150 print(y) ~= operator The ~= (does not equal) operator will return true if both variables are not the same. Otherwise it returns false x = "hey there" ~= "hello there" print(x) y = 150 ~= 150 print(y) > operator The > (greater than) operator will return true if the first value is greater than the second value. Otherwise it returns false x = 10 > 5 print(x) y = 10 > 15 print(y) y = 10 > 10 print(y) >= operator The >= (greater than or equals) operator will return true if the first value is greater than, or equal to, the second value. Otherwise it returns false x = 10 > 5 print(x) y = 10 > 15 print(y) y = 10 > 10 print(y) < operator The < (less than) operator will return true if the first value is less than the second value. Otherwise it returns false x = 10 < 5 print(x) y = 10 < 15 print(y) y = 10 < 10 print(y) <= operator The <= (less than or equals) operator will return true if the first value is less than, or equal to, the second value. Otherwise it returns false x = 10 < 5 print(x) y = 10 < 15 print(y) y = 10 < 10 print(y) .. operator The .. (string concatanation) operator allows you to add two strings together. x = "Hello" z = "World!" combined = x .. " " .. z print(combined) If statements An if statement allows your code to decide to do something, or not. Depending on a value. Often times if statements are used in combination with some of the above operators. An if statement is written as : if <expression> then <code> end x = 10 if x > 5 then print("X is higher than 5") end Any code between then and end will only be executed when the expression is true. You might also have noticed that the code between the then and end is moved over a bit to the right. This is called "indentation". Whenever we open a new scope (scopes will be discussed later in the tutorial) we move our code to the right. This is usually done by either a tab or several spaces . Many code editors will convert a tab to spaces. Else Within an if statement, you can also add an else block. The code in such a block will be executed when the code in the if block is not executed. x = 10 if x > 5 then print("X is higher than 5") else print("X is not higher than 5") end Elseif If you want to do multiple if statements, you can use an elseif: x = 15 if x > 10 then print("X is higher than 10") end if x > 5 then print("X is higher than 5") end x = 15 if x > 10 then print("X is higher than 10") elseif x > 5 then print("X is higher than 5") end The difference between the first example and the second is that if x is higher than 10 in the first example both lines "X is higher than 10" and "X is higher than 5" will be output. Whilst in the second example only "X is higher than 10" will be output. And if statement must always start with an if, can contain multiple elseifs, and may only have one else. name = "NanoBob" if name == "NanoBob" then print("Hello world!") elseif name == "Brophy" then print("Black 123") elseif name == "Tombaa" then print("Stupid") else print("I have no idea") end Functions Functions allow you to write less code, by reusing pieces of code. The syntax to create a function is function <name>(<parameters>) <code> end function foo() print("Hello world #1") print("Hello world #2") end In order to execute code in the function, you "call" the function. You do this by writing the function name followed by (). function foo() print("Hello world #1") print("Hello world #2") end foo() foo() foo() Functions also allow you to send a variable to the function, for it to do something with. This is what's called a function parameter. Function parameters are defined in the brackets () after the function name. function foo(x) print(x) end foo(10) foo("50") You may notice that this looks a lot like the print() we have been using. This is because print is a built-in Lua function. Return values A function not only can execute code, it can also give something back to where it was called. This is called a return value. In order to return something from a function you use the return keyword. function foo() return 10 end x = foo() print(x) print(foo()) Just like in an if statement, all code within a function is indented. Now let's combine everything we have learnt so far: function foo(x) if x > 10 then return "X is higher than 10" elseif x > 5 then return "X is higher than 5" else return "X is not higher than 5" end end y = foo(15) print(y) print(foo(10)) print(foo(0)) Scopes & locals We quickly encountered scopes before, and said we indent our code whenever we enter a new scope. But scopes allow you to do more than that. Most importantly, "local" variables. A local variable is only available in the scope it was defined in (or scopes that were created from within that scope) You can create a new scope using a do block (functions and if statements also have their own scope). do local x = 5 print(x) end print(x) do local x = 5 do local y = 10 print(x) print(y) end print(y) end For loops (For) loops are ways in scripting / programming to have code executed multiple times, without having to write the same thing multiple times. An example of such a loop: for i = 1, 10 do print(i) end The first part : i = 1, 10 defines a variable called i. Which start at 1. This will be incremented by 1, until it reaches 10. The code within the loop then can use this variable. You can also increment with a different number than 1 (including negative numbers) using this construct. for i = 20, 0, -2 do print(i) end This code sample will start with i at 20, and keep adding -2 (thus subtracting 2), until it reaches 0 Tables Tables are a datatype in Lua which allows for lists of things. Here's an example: x = { [1] = 100, [2] = 200, [3] = 300 } print(x[1]) print(x[2]) print(x[3]) Tables consist of key/value pairs. In the example above the key 1, has the value 100, 2 has the value 200, and 3 has the value 300. You can get the value in a table, by putting the key in between square brackets []. Like in print(x[1]). x = { 100, 200, 300 } print(x[1]) print(x[2]) print(x[3]) You can choose to not include the keys in a table. Doing so will automatically add numbers as keys, starting at 1. So the above example would be the exact same as the first example. Table keys and values can be of any data type, including other tables. This allows you to create (very) complex table structures. t = { [1] = { 100, 200, 300 }, ["x"] = 100, [true] = "something" } print(t["x"]) print(t[true]) print(t[1][1]) print(t[1][2]) print(t[1][3]) When using a string as the key in a table, you can leave out the square brackets and the quotes. This goes for both when defining the table, and for indexing it (getting a value from it). For example t = { x = 100, y = 200, z = 300 } print(t.x) print(t.y) print(t.z) A table's values can be modified / set after creating the table as well. t = {} t[1] = 10 t[2] = 20 t[3] = 30 t["x"] = "banana" t[true] = false t.x = "banana" When using tables you will often want to add something to the "end" of a table. This is most common when you are using tables with numeric keys. In order to do this you can use a # to get the amount of items currently in the table. t = { 10, 20, 30 } t[#t + 1] = 40 This will store the value 40 on the key 4 , because #t is 3. Iterators (pairs/ipairs) Iterators are a mechanism that allow you to make a loop, which goes over a set of values. Writing your own iterators won't be discussed in this tutorial. But there are two functions which are often used to create an iterator to iterate over a table. These are pairs and ipairs. t = { 10, 20, 30, 40, 50 } for key, value in ipairs(t) do print(key, value) end The difference between pairs and ipairs is the order in which the key/value pairs are iterated over, and which of the key/value pairs are iterated over. Where ipairs will always use numeric keys, starting at 1, and going up by 1 every time, until there is no entry in the table. This also means it won't iterate over anything key that is not numeric. t = { ["x"] = 5, [1] = 10, [2] = 20, [3] = 30, [5] = 50, } for key, value in ipairs(t) do print(key, value) end A pairs loop will iterate over any value in a table, but the order is not guaranteed. Meaning that between different runs of the script the order could be different. t = { ["x"] = 5, [1] = 10, [2] = 20, [3] = 30, [5] = 50, } for key, value in pairs(t) do print(key, value) end Callbacks Callbacks are when you pass a function as an argument to another function. To have the function you passed be called later on. This is used often within MTA. An example of a Lua function which uses a callback is table.sort. table.sort will sort a tables values, by default these values are sorted numerically. But you can use a callback to change this behaviour. values = { 5, 4, 3, 6, 8, 1, 2, 9, 7 } function sortFunction(a, b) return b > a end function reverseSortFunction(a, b) return a > b end table.sort(values, sortFunction) print("Sorted: ") for _, v in ipairs(values) do print(v) end table.sort(values, reverseSortFunction) print("\nReverse sorted: ") for _, v in ipairs(values) do print(v) end In the first call to table.sort (table.sort(values, sortFunction)) you can see the sortFunction function is passed as second argument to the function. Note that we don't write sortFunction() here (notice the brackets difference) because that would call the sortFunction function, and pass its return value to table.sort. table.sort will then call this function when it compares two different values, this function should return true or false depending on whether its second argument (b in this case) is larger than it's first argument (a), in the context of sorting. Anonymous functions It is also possible to use an "anonymous function" when passing a callback to a function. values = { 5, 4, 3, 6, 8, 1, 2, 9, 7 } table.sort(values, function(a, b) return b > a end) print("Sorted: ") for _, v in ipairs(values) do print(v) end table.sort(values, function(a, b) return a > b end) print("\nReverse sorted: ") for _, v in ipairs(values) do print(v) end MTA This part of the tutorial discusses MTA specific constructs. Code in this part of the tutorial won't run in the online Lua interpreter. You will need to set up a (local) server for this. Server & Resources By default when installing MTA:SA a server is installed as well. This server is located in the "server" directory of your MTA directory. This is usually at C:\Program Files (x86)\MTA San Andreas 1.5\server. This directory contains an MTA server.exe file, running this file will start a server. Scripts on a server are grouped by resources, a single resource can consist of multiple script files and other assets such as images, sounds, fonts, mods and more. Resources are placed in your mods\deathmatch\resources folder in your server folder. A resource is always in its own directory. A resource must always have a single meta.xml file. This file tells the server (among others) what script files to load. A typical meta.xml file looks like this: <meta> <script src="vehicleSystem.Lua" type="server"/> <script src="vehicleMods.Lua" type="client"/> </meta> You will need an entry for every .Lua file you want to have executed on the server. You can start a resource by typing start <resource name> in the server console (the window that opened when you started MTA Server.exe). The resource name is the name of the directory your meta.xml is in. (This may not have spaces). Starting a resource will start running the Lua scripts, if you've changed your scripts you will need to restart the resource for the changes to take effect. (restart <resource name>). Server vs client Lua code can be executed in one of two places. The server, or the client. Server sided scripts are executed on the actual machine that is running the MTA server.exe process. Client sided scripts are executed on the computer of every player that connects to your server. Server sided and client sided scripts have a distinct difference in responsibility and possibility. Some functions for example are only available on the client, whilst others are available only on the server (and many on both). Note: Some of these functions which are available both server sided and client sided are different on server and client MTA functions & wiki In plain Lua there's not much you can do to affect a game engine like MTA:SA. This is why MTA:SA offers a (large) list of functions available for you to use in your scripts which interact with the actual GTA world. You can find a list of all of these, what they do and how to use them on the MTA wiki. Server sided functions Client sided functions shared functions An example of such a function is createObject(). This function will create a physical object in the game. The wiki page contains information on how to use it (what arguments it expects, and in what order). And often shows an example of how to use it. createObject(1337, 0, 0, 3) Elements (userdata) At the start of this tutorial we quickly mentioned userdata data types. These are data types configurable by the implementation of Lua. In this case, MTA. MTA uses userdata to represent "elements". Many things in MTA are elements, like objects, markers, peds, players, user interfaces, vehicles, etc. On the MTA wiki you will notice many functions either return elements, or require an element as arguments. A list of different types of elements can be found on the MTA wiki. Elements also have a hierarchical structure to them. Elements can have a "parent", and multiple "children". This will result in a tree of elements, the element at the top of this tree (and thus the grandparent of all elements) is called the root element. Command handlers Often times in MTA you want certain things to happen when a player enters a command. This is done using command handlers, command handlers use a callback, which we previously discussed. The wiki contains a page for the addCommandHandler() function. For this example we will be using the server side version. function handler(player, command, argument) outputChatBox("You entered " .. command) if argument ~= nil then outputChatBox("You used the argument " .. argument, player) end end addCommandHandler("banana", handler) This example also uses the outputChatBox() function, this will output a piece of text to the chat.(in this case, only for the player who executed the command) The callback function passed to addCommandHandler will be called every time a player uses the /banana command ingame. Event handlers Besides having your script do things when a user executes a command you likely want the game to respond to many different types of things that happen in the game. Like players taking damage, coming close to something, etc. These things are called events. Whenever an event is triggered you can run a piece of Lua code. You do this using event handlers. Event handlers are created using the addEventHandler(). The first argument to the addEventHandler() function is the string name of the event. These can be found on the MTA wiki as well. Server sided events Client sided events An event is always triggered for a specific element, for example "onPlayerWasted" is triggered on the player that was wasted (killed). You can attach an event handler to a single element to only have your callback function be called when the event is triggered on that specific element. But you could also use the root element here and your function will be called for every element the event is triggered on. function handlePlayerDeath() outputChatBox("You died!!", source) end addEventHandler("onPlayerWasted", getRootElement(), handlePlayerDeath) The getRootElement() function used in this example returns the root element discussed earlier. You can also see source is used in this code snippet, we'll talk about that some more in the next section. predefined globals MTA has some predifined global variables for you to use in your script. A list of them can be found on the wiki. Here's a couple notable ones and what they're used for root The root element, same as the return value of getRootElement()) source The element an event handler was called on. An event's wiki page always describes what the event source will be for the event. localPlayer The player element for the player whose client the script is running on. (Thus only available client sided) client Will be discussed in the next section server <-> client communication As stated earlier in this tutorial scripts can run either on the server, or one of the connected clients. However often times you would want to trigger something on the server from a client, or the other way around. An example of this would be when the user clicks the login button on a GUI (Graphical user interface) the server should try to log that person in, and send him back whether or not this was successful. This can be done using events. MTA allows you to create and trigger your own events, and these events can be triggered from server to client (and the other way around). You can do this using the addEvent() function. Once an event has been added (and marked as remotely triggerable by passing true as second argument to addEvent()) you can call it from server/client. You do this using [triggerClientEvent()]https://wiki.multitheftauto.com/wiki/TriggerClientEvent() and triggerServerEvent() respectively. Server sided: function handlePlayerLogin(username, password) outputChatBox("You tried to log in with the username " .. username, client) end addEvent("LuaTutorial.Login", true) addEventHandler("LuaTutorial.Login", root, handlePlayerLogin) Client sided: function pretendLogin() triggerServerEvent("LuaTutorial.Login", localPlayer, "username", "password") end pretendLogin() This example will trigger the "LuaTutorial.Login" event from the client sided script. And passes the "username" and "password" arguments to the event. The server then handles this event in the handlePlayerLogin() function, which in our case just outputs something to the chatbox. In this example you can see the previously mentioned client global variable. This variable is set to the player element corresponding to the client the event was triggered from. (And is thus only usable when used in an event handler which has been triggered from a client). Now what? With this information you should be able to start scripting, and making things in MTA! If you didn't understand it all in one go, or you have any more questions there is no shame in that! You can find myself and many others willing to help you with your scripting questions in the #scripting channel on the MTA discord. Another good source for programming / scripting related questions is stack overflow.
  50. 10 points
    زي ماهو واضح بالعنوان في لعبة قديمة كنت العبها على البلايستيشن وكانت ممتعة نوعا ما ف الي حاب يفتح سيرفر ويتيمز بقيم مود جديد لعل وعسى يستفيد منه شرح مختصر تصادم سيارات طبعا فيه حلبات او مضمار سباق زي مانقول وتتسابق مع ناس تحاول انك تفوز او ماتخلي احد يصدمك wreckfest اللعبة اسمها طبعا الدمج بيكون على حسب السرعة الي تمشي فيها واللعبة فيها نظام تعديل يعني كفرات ضد الانزلاق ونيترو وتقدر تزود السيارة وتركب صدامات كل الي ذكرته قابل انك تسويه باللعبة بسهولة تامه , القيم سهل انك تسويه بس راح تحتاج مصمم مابات يصمم لك وتقدر تضيف غرف او بمعنى تخلي كل ماب منعزل عن الثاني طبعا راح تحتاج الدمنشن عشان تفرد الاعبين بمعنى اصح لو فيه 30 لاعب يلعبون بماب معين واللعبة بدأت وجا زيادة 5 لاعبين يحتاجون يلعبون في نفس الماب انت هنا تحط الماب والاعبين بدمنشن معين وتبدأ اللوبي تستخدم الوظيفة الي طرحتها سابقا عشان تجيب دمنشن فارغ وبس والله , طبعا انا كان ودي اسوي القيم بس قدر الله ماشاء فعل والي عنده زيادة على الفكرة او فكرة احسن يحطها عشان يستفيد الجميع وبالتوفيق ان شاء الله