Leaderboard
Popular Content
Showing content with the highest reputation on 17/01/22 in all areas
-
This MTA module is about total filesystem access to your MTA server. You can find it's documentation here. It supports the Windows and Linux operating systems, each with different and specialized details (path handling, OS calls, etc). Contains many neat features such as memory-mapped files, stream copy helpers, direct binary-encoded writing and reading API, etc. The module has got a very long history (used in Scene2Res, Magic.TXD). It is very strongly unit tested. If you like this module then you can use it's C++ API for even greater freedom. Current version: 2.0 Source code location (Module-specific): Source Tree: blueMods/fileSystem/ (head) - green-candy (svn) - green-candy - OSDN Source code location (C++ Library): Source Tree: FileSystem/ (head) - eirfs (svn) - Eir FileSystem - OSDN Download (Win32): https://green-candy.osdn.jp/external/releases/fileSystem_2_0_win32.zip Download (Linux): https://green-candy.osdn.jp/external/releases/fileSystem_2_0_linux.zip3 points
-
Airplane This resource adds ambient aircraft to your MTA map. As many as you want, as long as the MTA element stream engine likes it. The aircraft models can be modified in config_s.lua. The resource was pre-mentioned in the Server time sync resource, because it is was an example resource which made use of serverside time. (And still makes use of) But by posting updates there for a different resource is a bit confusing. It is beyond a test resource now. Note: you still need to download the server time sync resource for this resource to work. You will be given an option to download server time sync resource, when you the download the resource airplane. The resource doesn't only creates planes, but also helicopters. Which is confusing I know, since the resource name is 'airplane'. But it was already too late for that without losing my version archive. Version 1.2.0 / 1.1.1 video's Admin settings Quantity aircraft Developermode Displaying the airplanes and other useful information. Demomode true - Let the resource create the aircraft false - Fill in your own aircraft list manually in file: config_s.lua How the aircraft is adjusted according to the GTA map. The blue crosses are used to display the max ground height of that specific area(200x200). You see that the crosses are placed higher near trees and buildings. The resource will adjust the aircraft height according to this data. This view is visible when development mode is active and some adjustments in the config_s.lua for the ground height data. Dataset for the aircraft height is available here: https://wiki.multitheftauto.com/wiki/Dataset-map-height Pro's: Low CPU usage after initialization. No network usage after initialization. Only the dependency server time sync will use network usage after initialization. Not that many lines of code for you have to scan through, if you want to modify the resource. Simple to implement. If you find a bug, I will be here. Con's No AI implementation. Brain-dead AI. The 'time based driven (animations)' concept is used, not everybody is familiar with that concept. That makes it harder to edit. It basically means that the aircraft animations are unstoppable, since time doesn't stop either. Pro: Which nearly nullifies the need of constant network usage between the server and the client. All aircraft are indestructible (even if not set to damage proof). (Can also be a pro) But I might add something in the future to counter that... but I first must figure out how that is suppose to work. Does not work outside of the GTA map. Download link: Resource Airplane Other downloads: Resource Server time sync Dataset GTA map height3 points
-
Disclaimer: This is aimed at MTA open source contributors only. Hi devs! If you're looking for support regarding MTA C++/module/resource development, or you have some ideas or want to discuss about MTA development related matters, come and join our dedicated MTA development Discord server at https://discord.com/invite/GNN6PRtTnu where we have dedicated channels for various topics. The server is English only. Non-development chatter is prohibited. Please note that the MTA development server is only for development matters. If you need help with your MTA client/server or scripting, or you just want to chat and hang around, please use our official Discord server instead at https://discord.com/invite/mtasa2 points
-
To post a topic in the Scripting section your topic should meet the following requirements: It must contain specific questions about either: the code you will include that is problematic or you are asking direct support for, or asking for help in finding the best approach to achieve something. For example, asking more experienced scripters if there is a more efficient way of coding your desired script/function. The contents of the topic must focus around code support or coding methods. It needs to follow the Formatting guidelines and Conduct guidelines listed below. This section is not for: (resource) progress show-off, recruiting scripters, or polling interest or brainstorming on what kind of project you are up to next All of the above things have their own categories to post them in. These categories are respectively: https://forum.multitheftauto.com/forum/87-resources/ https://forum.multitheftauto.com/forum/149-looking-for-staff/ https://forum.multitheftauto.com/forum/140-mta-chat/ If you still post such a topic in the Scripting section mistakenly, the first time it will get moved gracefully to the correct section. Any subsequent repeated mistakes may result in an instant deletion of your topic. Formatting guidelines It would be highly appreciated if you tag your topics appropriately and use proper topic titles. Although this is not a hard requirement, it helps to maintain overview. Use the following template for this: [BUG] TOPIC_TITLE - for problematic code that will not work or has issues that you need assistance with. This type of topic must always contain a code snippet of the script in question. Most of the times, you will need to provide the entire script. [QUESTION] TOPIC_TITLE - scripting questions, including (but possibly not limited to): asking for help in understanding scripting principles, function or code usage, or if you wonder whether your approach to achieve something is the most optimal and efficient one. We are all learning and aid from more experienced scripters can be useful. Use code snippet tags. Always add your code (if applicable) in this uniform way. Click the ''< >'' shortcut in the text editor, as seen in below screenshot: Then put your code within the box that said button (< >) creates. Be sure to select Lua for highlighting from the drop-down list in bottom right corner for automatic syntax colouring, wiki links for built-in functions and events and other cool features. Please do not use loose [ code] tags for the sake of readability. Do not mass-quote code snippets, or else it would fill up the whole topic with repeats of the same code over and over again. Remove the code column from a previous quote before posting or limit your own quote by narrowing down the parts of code you are replying about. Quote selectively. Advice Last but not least, please try to explain your issue or question the best way you can. A clean and detailed topic can increase the chance that someone will sit down to analyse your problem and actually help you. Clear communication and description is also the key to attracting scripters who may potentially take a look for you. Note that a common request is to "post the full script" and that isn't without reason - problems often go deeper than you think (or the issue is structural / architectural of nature) and other scripters will find it difficult to help you debug or trace it without having a good picture of everything. Especially with questions regarding bugs or something not working as it's supposed to, you may have low or non-existent outreach from others if you're not providing full code. Similarly, also keep in mind posting screenshots (or lines) from debugscript, errors or warnings, that include the line number, you will need to number any script code you provide in your topic to ensure others can intepret it and find the corresponding erroring lines. Code of Conduct Treat everyone with respect, no matter their skill in scripting. If someone posts what you think is low level/''stupid'', remember that you have once been there as a novice scripter yourself and everyone should have a chance to learn. Instead of resorting to humiliating replies, think about how hard it is to learn how to script efficiently, and dedicate yourself even more to help them understand it. You might play a noticeable role in someone's future as MTA scripter (or who knows, maybe an even more prominent role later on too). Long story short, avoid making remarks or rude comments aimed at someone's skill level, incapabilities, etc. It is not appreciated neither by us Moderators nor by regular users of the forums. The Scripting section is not meant for those unwilling to learn, whose only intent is to try get others to finish the scripts they need, line by line. We see this happening way too often - someone with seemingly zero scripting skills does not react on-topic to the set of functions they can use that other users provide them, and does not seem to take any pushes in the right direction forward; they are just waiting for a collective effort from other scripters to develop what they want. This is what we do not want to see. Do not expect all the work to be done for you while you lean back. You should at least try to script it by yourself - users on this subforum are generally happy to help in any particular issue you come across while coding. If you see someone who keeps bumping their topic that is clearly oriented at letting his work be done by others, then please report the post. The bumping policy in scripting section is a bit different from other forum sections, because scripting topics serve as a sort of knowledge-base for those dealing with the same issue/question as described in existing topics. It is often suggested (and usual practise for many scripters) that prior to posting a new topic, someone searches the forums to see if their question has been asked/answered before. Therefore, you may bump old topics if you're certain your approach or solution/code is better than other posted answers, and if it's a fairly common question (not someone just asking how to have their own code fixed or similar case-specific topics). However, we the moderating team may still review if your posts are really useful bumps with new insights, and even if so, we can lock the topic to prevent derailing of an old topic/continuous posts. So expect your useful bumps to possibly be the last ever made in a certain topic (which means if you do it, do it well). If you believe a popular topic for a really common scripting problem should be unlocked for you to post input, or you wish to improve upon someone's earlier bump after which it was locked, then please use the Report button referring to this part of the regulations. No support is offered for leaked code or scripts (even if they only partially originate from a leak) and such topics will be locked and trashed on sight. If you notice a topic where something related is being asked, or other clandestine requests (such as questions how to decompile scripts, etc, anything with not-so-noble intentions) then please report the topic and do not reply as it may incite unnecessary arguments. Mention the source proving that it is a leaked code within your report, though you can omit that if you feel that it is fairly obvious that the resource/script was leaked. In the latter case however, keep in mind that we may not be aware of such a leak, so the Moderator who handles your report will have to take his judgement upon it if you do not provide evidence. Still, keep in mind that you should not openly accuse users who post pieces of your (or someone else's) code as per https://forum.multitheftauto.com/topic/46410-stolen-resource-accusations/. If this happens, simply report such posts. Failure to abide by the Code of Conduct may result in a forum punishment. If you notice anything that violates the Code of Conduct, please report those posts instead of enforcing the rules yourself. It just takes a few seconds, but greatly benefits the Section and makes it a better place to seek help from.1 point
-
Hi people! Same drill as usual. The year is nearing to an end, so here is a freshly baked summary post for you. Read on and learn about all the interesting things that happened in the MTA community in 2021. 2021 in Recap Early this year, we have restructured our Moderation team a bit by adding the Specializations divisions (such as: Management, Tech and Infrastructure, Social Media). The aim of this was to refine extra talents of our Moderators and put them to a better use. As one of the results of that, the Management division has introduced a new way for more-involved-but-not-quite-there-yet MTA supporters to contribute - a Helper role. Curious about what it is? Check out the post by Tut. At the end of July, our developer and designer, Patrik, has revived the live streaming idea a bit and played some MTA:SA on our Twitch channel. He focused on visiting various servers ran by the community. In case you have missed it, you can check the stream capture here: https://www.youtube.com/watch?v=n2KcspT0F0A There were a few recurring requests that you guys have kept asking us about over the years. One of them was to release the mobile version of MTA:SA - apologies, but unfortunately that is still not going to happen ?. But another request was to make it possible to buy some official MTA merchandise. And guess what - we have listened to you on that one! Patrik has prepared some neat designs and we have put them for sale - although please keep in mind, we do not make any profits of these sales. Want to see the goods? Check them out here: https://multitheftauto.myspreadshop.net/all Not that long ago, in early October, we have released Multi Theft Auto: San Andreas 1.5.9. This release was focused on wrapping up the contributions made to the mod so far and put them in a single package for your convenience. Same month, Rockstar Games has announced an upcoming release of "Grand Theft Auto: The Trilogy - The Definitive Edition", a remake/remaster of the original 3D era GTA trilogy (GTA3, GTA:VC and GTA:SA). Not only was it a sudden announcement, but also the release was coming really soon. The remastered games were released, but received mixed reactions from gamers and reviewers. Technical-wise, they are a feat, as games were remade in a different and well-established game engine and are available for multiple platforms. Sadly, the same could not be said about the actual quality of these games as it was inconsistent. Hopefully, the improvements planned by Rockstar will bring them up to the quality they deserve. It is important to note that MTA mods (GTA3:MTA, MTA:VC and MTA:SA) do not work with the remastered games from the GTA: The Trilogy. We currently have no plans of making them compatible, as it would require an insane amount of effort, considering the technical differences between the original games and their remastered equivalents. Lately, our Development and Infrastructure divisions have been working on improving the reliability and performance of our web services. You may have noticed that for instance, our forums have been running faster - it is all a result of CiBeR's hard work. One of our distinguished community members, Haxardous, has prepared a list of interesting MTA:SA servers. If you are looking for a new MTA:SA server to play on, then you might want to check out one of his recommendations. You can find them here. ModDB has recently featured all of the mods that won the "Mod of the Year" award in the last 20 years. We had won this award ten years ago, so naturally we are on the list too! A bunch of interesting MTA:SA-related YouTube videos from this year [DM] NikotiN ft. Lost ft. Driver ft. SKooD - Enormous Cataclysm - video by CHRS / map by Nikotin, Lost, Driver and SKooD MTA-SA: Welcome to San Andreas Trailer (WTSA) #1 by ヌルぽ / Nurupo #MTA:SA: ~ TACTICS / STEALTH by notzz & the_bestteam Grafuroam drift handling update by Unity SHORT ONE | NON-STOP MTA DAYZ by BuczU YouTube in Car - Interactive Dashboard (MTA:SA) by Chemical Creations MTASA Dangerous Experiments by Toliak Purple Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 37 487 players 2021.12.19 (at 19.13 GMT) Highest recorded number of concurrent unique players 52 098 players 2020.04.02 (at 18.00 GMT) Recent number of daily unique players 148 783 players 2021.12.19 (Sunday) Highest recorded number of daily unique players 185 818 players 2018.02.03 (Saturday) Recent number of monthly unique players 626 613 players November, 2021 Highest recorded number of monthly unique players 805 903 players January, 2018 MTA:SA version or series Percentage of players using that version or series as of 25th of December, 2021 1.6.0 (alpha; custom) 0.2% 1.5.9 97.6% 1.5.8 1.9% 1.5.7 (and older) 0.2% 1.4.x + 1.3.x 0.1% Still looking good. On a side note, our community on Discord keeps growing. We went from 20k users last year to nearly 40k this year. Our presence on social media (Twitter, YouTube, Twitch, Facebook and Reddit) is improving too - thanks to work done by Patrik and the Social Media division. --- Enjoy the holidays and hope to see you back in the next year! -- MTA Team1 point
-
local is_hit, hitX, hitY, hitZ = processLineOfSight( 0, 0, 5000, 0, 0, -30, true, false, false, true, true, false, false, false, nil, false, false ) if (is_hit) then outputDebugString( "hitZ: " .. hitZ ) end1 point
-
Fica mais fácil também de deletar, copiar os dados depois. Uma vez q vc não vai precisar editar o banco de dados do servidor e sim apenas do resource. Se for feito na DB do servidor, fica muito mais difícil vc copiar os dados deste resource específico para outro servidor, por exemplo.1 point
-
1 point
-
hi ๖ۣۜζ͜͡RapGod, i want to help you with this i will give you some code you should try this. function toggleWindow() if(guiGetVisible(panelWindow) == false) then guiSetVisible(panelWindow, true) showCursor(true) else guiSetVisible(panelWindow, false) showCursor(false) end end bindKey("o", "down", toggleWindow) You can check if the panel is visible with guiGetVisible() no variable needed1 point
-
I'm too late to write this message but happy birthday anyway I will stay more interactive with the mta forum site from now on.1 point
-
1 point
-
1 point
-
ببساطة قم بعمل جدول وفيه الأزرار وإستخدم حدث onClientKey وتحتاج لـ isElementWithinMarker لـ تأكد من أن اللاعب فالماركر لو كان فالماركر قم بـ الفنكشن cancelEvent. فقط.1 point
-
Map files Table of contents: Introduction How to read a map file? Broken map file, what to do? Editor bugged, what to do? Modify your maps outside of MTA Extra links Introduction A map-file! What is that? The name already gives away the definition. It is a file which contains a MTA map. The format makes maps portable, so that you can send them over to your friends. You can recognize map-files by the extension: .map Here is an example of a map: Syntax highlight When you open a map file in your text editor. The syntax highlight you should use is XML (HTML will work as well, but the semantic is different and could cause issues with auto complete features, that is if you have enabled those). Changing syntax highlight in for example Visual Studio Code. How to read a map file? Before we start, this is what we call a node: <tagName></tagName> If we take a closer look to the following map file: <map> <object id="object (bevgrnd03b_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> <object id="object (gaz9_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6133" scale="1" dimension="0" posX="625.49114990234" posY="-3771.6955566406" posZ="11.479743003845" rotX="0" rotY="0" rotZ="0"></object> <object id="object (CE_grndPALCST03) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="573.09802246094" posY="-3847.013671875" posZ="3.6442375183105" rotX="0" rotY="22" rotZ="352"></object> <object id="object (CE_grndPALCST03) (2)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="572.64624023438" posY="-3769.0698242188" posZ="4.9519920349121" rotX="0" rotY="21.99462890625" rotZ="343.24649047852"></object> <object id="object (CE_grndPALCST03) (3)" interior="0" collisions="true" alpha="255" doublesided="false" model="13120" scale="1" dimension="0" posX="669.66534423828" posY="-3856.0627441406" posZ="3.6442375183105" rotX="0" rotY="63.99462890625" rotZ="175.99389648438"></object> </map> > we see in there the map node: <map></map> When the map is loaded <map></map> will become our map element. And inside of the map node we see more nodes: <object id="object (bevgrnd03b_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> <object id="object (gaz9_law) (1)" interior="0" collisions="true" alpha="255" doublesided="false" model="6133" scale="1" dimension="0" posX="625.49114990234" posY="-3771.6955566406" posZ="11.479743003845" rotX="0" rotY="0" rotZ="0"></object> In this case these two nodes will become two in-game objects. Tagname <tagName></tagName> Each node in the map file will become an element in game. !important A node has a tag name. In this case I gave it the name: "tagName" This tag name specifies in MTA the element type. For example: If it has the name <object></object>, the element-type is an object. If it has the name <ped></ped>, the element-type is a ped. What if the tag name is not matching with one of these entities? (The list is not complete, the rest can be found in this class list, only if the XML syntax is implemented) Then the elements are considered custom elements. They are not visible in game. Custom elements Custom elements have their own purposes. You often see those custom elements used in game modes, for example stealth: <mercenaryspawn id="mercenaryspawn (1)" posX="635.58117675781" posY="-3770.458984375" posZ="18.97974395752" rotX="0" rotY="0" rotZ="0"></mercenaryspawn> The tagname for this node is "mercenaryspawn". The element that is produced after loading the map, is used as a spawnpoint for in a stealth map. Custom elements are invisible. Custom elements do have an orientation. The getElementsByType function can be used to get custom elements. Attributes Attributes are properties applied to a node. They are used to attach data to an element. Example: <entity name="IIYAMA" age="5" type="device" resolutionX="1920" resolutionY="1080" displaySize="31"></entity> An attribute exist out of two parts: <entity name="value"></entity> Name Value The name specifies if the node has the attribute. <entity name></entity> <entity age></entity> If the name is "name", then the node has the attribute "name". And if the name is "age", then the node has the attribute "age". The value will be used for the data for each attribute. <entity name="IIYAMA" age="5"></entity> Identifiers (ID) Every elements can have an identifier attribute, which is used to make it accessible for scripting functions. <tagName id="identifier"></tagName> The identifier of an element can be used in getElementByID to grant access to it. Even though identifiers normally should be unique for each individual, it is not the end of the world if they are not in MTA. They might also be considered as unnecessary for map files without scripts. Element specific attributes There are some attributes that do more than just applying properties. They will change the element appearance and orientation. For example this object: <object interior="0" collisions="true" alpha="255" doublesided="false" model="6094" scale="1" dimension="0" posX="635.234375" posY="-3827.2275390625" posZ="5" rotX="0" rotY="0" rotZ="0"></object> It will be created in interior 0. It will have collisions. (You can walk on it) Alpha. It's opacity is 100%. It is not doublesided. (When you stand inside of the object you can look through it. If doublesided is enabled the same colors/paint from the other side will be applied.) It's model is 6094. It is scaled 100%. (0.5 = 50%, 2 = 200%) Etc. If you want to know which attributes do have influence on the elements appearance and orientation, you have to look that up on the wiki. Here a small list of some those attributes: Broken map file, what to do? If your map file is broken. Step 1 Make a backup. + Always make a backup when re-editing your map. Settings can get lost! Step 2 The first thing you want to do, is just open it in a text-editor. Just give it a quick look and check for anything strange. The file could be empty or some strange values could be used. Do you want to know all the syntax rules (XML)? You can find a list right here: http://www.adobepress.com/articles/article.asp?p=1179145 Step 3 Remove the editor definition. This definition could cause problems in case of invalid characters. From: <map edf:definitions="COBDEF,editor_main"> <!-- Map elements --> </map> To: <map> <!-- Map elements --> </map> Step 4 If you can't find the problem, then you could validate the file. There are services out there that validate XML files. They can help you to find out where your file is broken. Validation tool by W3C: https://validator.w3.org/#validate_by_input Note: You need to do step 3 first. Else you can't parse the file. Step 5 In case of re-opening map files in the editor, but doesn't want to get open. Make a backup. Remove custom elements. See chapter How to read? Retry to open the file. Editor is bugged, what to do? Your editor could be bugged and you are not able to save the map or open a new one. The first thing you want to do is backup the editor_dump folder in your server. This folder is located between all your resources. server\mods\deathmatch\resources\editor_dump Rename the folder name. editor_dump > my_broken_map Stop the map editor. Check if there is a new editor_dump folder. If there is, rename that one as well. Start the map editor again. Modify your maps outside of MTA Sometimes you want to modify your maps without going back in to the editor. Your text-editor is in most cases the way to go. For example you want to move all objects to a new dimension. In Notepad++: Make a backup! (if you are new to this) Select in your file the part you want to replace: dimension="0" Commando: ctrl + H (replacement overlay) Fill in the replace field: dimension="1" Click on: replace ALL. Moving your map? There is a nice online tool that can help you with that: https://mtaclub.eu/converters Edit your map with the DOM (Document Object Model) Knowing JavaScript? Your browser inspector can be used to modify your maps at a higher level. (If you so desire) Extra links: Parent, child and how this is reflected in MTA https://wiki.multitheftauto.com/wiki/XML https://wiki.multitheftauto.com/wiki/Element_tree Elementdata <sync_map_element_data /> https://wiki.multitheftauto.com/wiki/Meta.xml Load maps (manually + including in meta.xml) https://wiki.multitheftauto.com/wiki/Meta.xml https://wiki.multitheftauto.com/wiki/LoadMapData Save maps https://wiki.multitheftauto.com/wiki/SaveMapData1 point
-
Unlike the last time it was hidden to work on the post, today these regulations really take effect. As written in main post, there's a 1-week cooldown period in which we won't enforce most regulations listed here, but only politely warn users breaking them. This is to let everyone adapt and get used to the regulations & guidelines.1 point