1. Lord Henry

    Lord Henry

    Other Languages Moderators

    • Points


    • Content Count




    Scripting Moderators

    • Points


    • Content Count


  3. DNL291



    • Points


    • Content Count


  4. unsiXioN



    • Points


    • Content Count


Popular Content

Showing content with the highest reputation since 03/12/18 in all areas

  1. 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
  2. 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
  3. 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
  4. 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!
  5. 19 points
    Hey, i reworked mta community webpage. I apologize in advance for my bad english ❤️ Russia power!
  6. 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.
  7. 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.
  8. 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
  9. 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
  10. 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.
  11. 14 points
    A poor demonstration of custom face morphing
  12. 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
  13. 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
  14. 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.
  15. 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.
  16. 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|>
  17. 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.
  18. 11 points
    ServerIP: Our Discord: https://discord.gg/aR4kGxY OUR FORUM: https://forum.redcountyrp.net/ TEAMSPEAK: 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:
  19. 11 points
    السلام عليكم ورحمة الله وبركاته اتهامات سرقة السكربتات بدون دليل ممنوعة, لاحظت في الفترة الأخيرة اتهامات بين أعضاء المنتدى بخصوص نشر سكربتات مسروقة وما شابه ولذلك اذا توفر لديك الدليل الكافي بأن السكربتات مسروقة وليست ملكاً للشخص الذي قام بنشرها قم بالتواصل معي على الخاص وسيتم التعامل مع الموضوع. * ملاحظة: ليست لدينا أي صلاحيات تجاه السيرفرات التي تستعمل سكربتات مسروقة, فقط السكربتات التي تم نشرها على هذا المنتدى. تحياتي لكم
  20. 11 points
  21. 10 points
    Hello MTA:SA community, i release now all my Selfmade Gamemodes and Scripts. INFO: You have a error, warning or otherwise? Then write me a DM(Direct Message) or add me on Discord (DorteY#3099) and write a DM there. Hud (Script): https://github.com/DorteY/mtasa-selfmadehud Cops 'n' Robbers (Gamemode): https://github.com/DorteY/mtasa-copsNrobbers (Updated: 10.12.2019) Zombie Apocalypse (Gamemode) https://github.com/DorteY/mtasa-Apocalypse (Updated: 12.12.2019) Lakeside Reallife (German) (Gamemode) https://github.com/DorteY/mtasa-LakesideGER (Updated: 25.12.2019)
  22. 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.
  23. 10 points
    بسم الله الرحمن الرحيم الصلاة والسلام على اشرف الانبياء والمرسلين نبينا محمد عليه افضل الصلاة واتم التسليم, اما بعد: أقدم لكم دورتي لـ تعلم لغة برمجة لوا.. ملاحظة: توجد مشكلة في الدرس الثاني الا وهي صغر الخط, وتم حلها ولن تتكرر في الدروس القادمة باذن الله تعالى MTA الدورة لا تتوجه لـلعبة ولكنها تتكلم عن البرمجة بشكل عام بالاضافة لتعليم وتدريس في لغة لوا اذا كان فيه نوع من الاقبال والتفاعل سأتخصص بـ برمجة ام تي ايه بالاضافة لبرمجة الديسكورد وشرح بعض اللغات الاخرى دمتم سالمين في أمان الله..
  24. 10 points
    If you're having issues with models or are looking for help on how to achieve certain results, feel free to ask in here. Note: Please check the Guide section before asking questions in here. Frequently Asked Questions on GTA modding the FAQ is on 3DS Max, though can be applied for various app's Lighting and Shading #1 Why can't I change the smoothing of my model? Your model contains duplicate vertices - this is a typical issue within GTA importers. They tend to break the vertices/split the edges on import, requiring to be welded. View the spoiler for a potential fix. #2 My map model is overexposed in day and night time. Your model lacks vertex color and illumination respectively. The GTA engine uses vertex color information to define lighting which is baked into the model. View spoiler for a potential fix. #3 Why is my Infernus model so bright? GTA engine calculates brightness of vehicles based on map objects collision brightness (that it's standing on) and the vehicle surface properties. View the spoiler for a potential fix. #4 My striped Bullet has different brightness for primary and secondary colors. GTA engine uses different lighting techniques for vehicles than map objects. Some of which are specular lighting, which in short brings a fake highlight onto the vehicle surface, illuminating it. View spoiler for a potential fix. Modeling #5 Certain polygons are not visible ingame, but looks fine on 3D editor. GTA engine among most other game engines uses backface culling, which kills the faces that are not facing/are blocked by ones facing the camera. This procedure is done to save memory. View the spoiler for a potential fix. #6 Can I make scissor doors for my vehicle without requiring scripts? It is possible to modify how vehicle doors appear in their open phase. It involves changing the rotations of dummies and their children objects, the doors. View the spoiler for a potential method. #7 How does vehicle reflections and chrome work? GTA vehicles uses 2 UV channels; first for diffuse, second for env and chrome mapping. If the secondary UV channel is not unwrapped properly, the env/chrome will either not work or flashes too often. View the spoiler for a potential method. #8 I can see through my vehicle chassis when looking at the police decals, why is that? Materials that are responsible for alpha needs to be last in the multimaterial list. If this is not done, textures like police decals will not render parts of the vehicle behind the alpha. View the spoiler for a potential fix. #9 How do I make a vehicle paintable? GTA SA requires models to have a certain colorcoded material applied to the surface of vehicles that needs to be paintable. It also needs (optionally if using textures) a texture that is not black. As anything that isn't black will be. If parts of the texture is grey, the color ingame will look sort of dirty or old. View the spoiler for a method. Miscellaneous #10 I have imported des_sherrifsgn1.dff into 3ds and extracted the textures into a folder, but they aren't displayed. It is not enough to extract the images, you'll have to tell the program where your textures are stored for it to apply them on the model. View the spoiler for a potential solution. #11 I want to remove Wuzimu's glasses and export it to my game. How do I do this? You're going to need a GTA formats importer. I prefer Kam's vanilla tools for skins due to its decent support for bones and skinned models. View the spoiler for a potential method. #12 What file types are worth to know about? GTA has many, many file types, and a lot of them are not natively available in MTA unless you modify your server's anti-cheat system to allow locally custom data files etcetera. So if we're going with MTA friendly files, there are a few. View the spoiler. #13 Where do I find shared vehicle textures, and what's each their use? You can locate the .txd for shared textures in GTA SA dir\models\generic\vehicle.txd. It stores textures which are used for SA vehicle lights, lighting and many more textures, which are used across hundreds of vehicles. As these textures are found in your local files, none of them are required to be added to custom vehicle .txd files, making for potentially very low file sizes. View the spoiler for a full list. #14 I have downscaled my model, but in-game it remains the same size as before. If your model's scale values says something like 76,144, 76,144, 76,144, it will reset to 100, 100, 100 on export. To correct this, go to Utilities panel, click Reset xForm, Reset selected, then right click the modifier and collapse to. Now your model will have its new scale applied. #15 I have converted a Counterstrike map and turned the main mesh into a collision which is 250kb. I am getting invisible walls, why is that? GTA has a very low polycount limit in regards to collision models. Not to be confused with collision primitive models, which are spheres or boxes, but the CM itself. If it is above or around 5000 (needs additional sources...) polygons, issues will occur, such as invisible walls or as if there's a large box blocking the entire model off. Another culprit for collision issues is the pivot point and position that the collision is exported at. You need to set the collisions to 0, 0, 0 and pivot point needs to resemble that of the main model, otherwise they will not line up properly. #16 My character movement is bugging on custom modeled stairs. GTA III, VC and SA do not have support for advanced staircase collisions, and so they require a different approach, which is a planar ramp or slope if you will. This may not look very good when the character steps on the stairs, however it is the most performance and bug-less method around. **Please feel free to contribute to the FAQ by leaving a comment here or through PM. It will be greatly appreciated.** little note for colors #B8E0B6 #4A4A4A
  25. 10 points
    This topic contains the MTA global ban policy, information on how to appeal your ban and instructions on how to file a report (see bottom of topic) ** Different language versions ** Russian (русский): КЛИКНИТЕ СЮДА Для русскоязычных пользователей Portuguese (Português) CLIQUE AQUI Versão em português Arabic النسخة العربية (عربي) انقر هنا Romanian (Română) APĂSAȚI AICI Versiunea în limba română This board is for global MTA bans only ("You have been banned by MTA"). It's not to be used for when you get banned from a server. In the case of server bans, please contact the admin of that server or use their website/forums to appeal if they have one. If you want to appeal a global ban, then please create a new topic HERE (click) that includes atleast your MTA serial. How to find your serial: launch MTA, press the F8 key and write ``serial`` into it. Now, select your serial and copy it using CTRL + C, then paste it into your appeal topic. If you received a global ban, you can appeal it under certain circumstances. Examples: - The ban is permanent, or has a pretty long duration (a month or more). * If a ban is permanent, no duration (ban time left) is shown in the ban message. - The ban is custom. This is the case when your ban message shows a reason that is not "TRAINER" or "DLL INJECTOR". * This can happen when you got banned as a result of illegal conduct on MTA. * The possibility to appeal bans mostly exists for these situations, where your appeal will prompt us to review if you can be unbanned, based on the offense and its severity. If you post an appeal and your ban doesn't fall under the above circumstances, then it may be removed rather than being answerred (although we more often do our best to make people understand the specific reason of their ban). This is because of the sheer volume of appeals for automated bans (for trying to run old, detected cheats or 1-hour bans for DLL injectors) would otherwise be insane. If it's a short-duration ban, then please just wait for the ban to expire. Explanation of the most common ban types and categories of bans they cover: "TRAINER" - Bans related to cheating: - If the ban is temporary (a few hours to a couple of days), then you attempted to run a detected cheat or used it while it was still working. * In the case of high-impact cheats, the ban duration can be a couple of weeks to a month. The same goes for paid (or subscription-based) cheats. * It is also possible that MTA AC's heuristics flagged you for custom cheating, such as amateuristic attempts to modify memory or use your own little cheat. This can sometimes also result in a temporary ban. - If the ban is permanent (note: with the type "TRAINER"), or for more than 2 months, then there can be several possibilities: * We know that you're a cheat developer, and we took efforts to remove you from our platform in order to stop you from messing with MTA and its anti-cheat. In this case, you have played your entitlements and we can deny your appeal on our discretion. However, we are always willing to give your case a fresh look. If you think that you've learned from your mistakes, and are willing to use our Bug Bounty program (click) in the future instead, you may be given another chance. So you're always welcome to appeal your ban. * You used a particularly serious (intrusive) cheat, one that we would call 'serious hackage', for example one that allowed you to ruin the game for everyone on a server or set out to harm a server or its integrity. This also goes for attacks aimed at a server or its playerbase that were packaged as executable code that you loaded & used in a cheat-like fashion. "REASON" - Custom bans that give a hint of the reason in your ban message. If you engage in illegal activities, we consider it our duty to keep the rest of MTA safe from people such as yourself. Under no circumstance will we allow MTA to be used as a platform for illegal or malicious actions. Besides that, although this policy covers most situations and possible ban reasons, MTA staff can use their discretion to ban for any reason that can reasonably be considered as illegal, harmful, or damaging to MTA as a platform or its users. You will most definately be able to figure why you got banned from the ban reason text, and if you don't, you can always make an appeal to get further explanation. Also please note, if you post a ban appeal topic (for a ban about illegal conduct), you automatically agree that said topic, its content and any later posts in it won't ever be removed from the MTA forums. Reason being that while the ban was to protect MTA and its users/server owners from illegal conduct (malicious people such as yourself), if you later return to MTA others can be informed about you and your past to be prepared against falling victim to illegal conduct themselves. It helps for case-building (future offenses or moderators in need of referencing). We also reserve the right to add in (at most) MTA serial(s) to appeal topics. Common examples: * "DDOS" If you carry out DDoS/network attacks against MTA servers or other players, then you do not belong on MTA, and we will ban you to protect others on MTA against you and put consequences to it. Therefore, when we receive a substantiated report about you, we may decide to ban you if there's overwhelming evidence, or ban you indefinitely for our investigation to proceed (read below for details). * "RAT" If you (try to) infect the PC of MTA players with viruses or (remote control) trojan, which are called RATs. The most common way is for someone to share infected file (links) in a server's chat, or directly to a person that you have a relation to because of MTA. We ban those that engage in illegal activities like this as well, because MTA will not be a platform for such acts; if someone deliberately tries to inflict harm or digital safety risks to another player, we believe that person doesn't belong on MTA. * "EMAIL: ADDRESS" e.g "EMAIL: CCW808@GMAIL.COM" or "EMAIL: MCAK105@OUTLOOK.COM" This ban message means you got banned to allow us to investigate something you were involved in. If you see this, then please send a message to the e-mail address that is mentioned, which belongs to the MTA staff member willing to investigate you. It can be a result of a report against you (illegal activity, for example as described earlier) or (unknown/custom) cheats/hackage that you seem to have used and of which we want to learn more. We may even desire to know more if MTA anti-cheat managed to block & detect your attempts. For this reason, sometimes, temporary "TRAINER" bans may turn into this ban type or become extended/permanent. Also, doing suspicious things while not getting banned (like only kicked by advanced AC heuristics) can have you confronted with such a ban when you launch MTA at a later point. If there's overwhelming evidence for what you're suspected of doing, you may aswell see a hint of the reason followed by the e-mail address. Ex. "DDOS [EMAIL: ADDRESS]" This means we're confident that you did it, but that we're still interested in talking to you anyways. It merely offers you a way out, perhaps to get unbanned (early) by cooperating with us, express regret, or share your side of the story. At the same time, this type of ban message is also an encouragement to just accept your mistakes and move on, by understanding you did what the hint points to and that it got you caught. Unlike the ban message saying "EMAIL: ADDRESS", the variation with "REASON [EMAIL: ADDRESS]" can aswell be temporary and be unbanned at a set date. So if you recognize and accept your mistake, just wait for it to expire. * "CHANGE" / "SERIAL CHANGE" This ban message means that your serial (the one that got banned) isn't authentic: you (attempted to) change your MTA serial, and this got detected. Using technical measures to try manipulate MTA into generating a new serial results in a ban on said serial if it appears to succeed. Because they get banned, it's not succesfull after all, because you now cannot use it. If you return to using your original serial (undo the tampering that you tried getting it changed with), in most cases you will be able to play again. If you cannot figure it out/are convinced that you didn't try to serial-change, then feel free to create a ban appeal topic and we'll check on your case. * "BACKDOOR" This ban message means that you included a backdoor (or hidden commands with destructive or abusive functionality) in any script or gamemode that you (re)distributed, advertised or sold to any party. Investigation would result in a clear indication that you are in control of said backdoor. There are no excuses for the use of backdoors in MTA scripts. Justifications like "security" or "it's to protect from our gamemode being leaked" are invalid, because your actions in such a case would be an illegal action in itself (ex. using a command to set your own admin level would be considered hacking, using a command to shutdown/dump the server would be an hacking intrusion to the server infrastructure.. answerring immoral or bad acts with illegal acts isn't the right solution and will get you banned). Even though we now motivated this, we do realize that this excuse will be used to cover the intentions of 90% of the people who implant backdoors into their scripts and gamemodes, and still we do not believe this by default. But as you can see, such excuses would be invalid anyways. * "[SERVICE] ABUSE" / ex. "FORUMS ABUSE" In extreme cases of abuse on MTA services (such as forums, discord, community page), we may decide to global-ban you. For example: - if you're constantly evading bans on forums/discord, becoming a pest to our moderation team - if you're uploading resources with backdoors/exploits (such as hidden commands or destructive functionality) to the community page - if you're malicious towards the MTA infrastructure or intend to inflict MTA serious harm - if you engage in unacceptable behavior towards MTA staff, such as blackmailing or threathening them or their surroundings, because they are doing their job Please always remember that MTA: San Andreas is made and ran by volunteers that devote their free time offering you a game to play on and have fun. You're a guest, and not definately entitled to using our services; that's a favor. If you become very disruptive, causing us a lot of trouble, or soaking up moderation team resources to deal with the problems you cause us, then don't be surprised if you're no longer welcome to play on the platform we offered you. *Note: the above text refers directly to the "SERVICE ABUSE" paragraph. While the purpose of this topic is to explain why someone that wants to appeal may have been banned, it also contains our banning policy and a list of common bannable offenses. So as a side note, perhaps as a victim of something, you want to report someone that has engaged in activity listed in here, then feel free to send a message to Dutchman101 and/or ccw (you could add both into the same conversation, but make sure to at least send it to Dutchman101 to ensure timely handling of your report)
  26. 10 points
    زي ماهو واضح بالعنوان في لعبة قديمة كنت العبها على البلايستيشن وكانت ممتعة نوعا ما ف الي حاب يفتح سيرفر ويتيمز بقيم مود جديد لعل وعسى يستفيد منه شرح مختصر تصادم سيارات طبعا فيه حلبات او مضمار سباق زي مانقول وتتسابق مع ناس تحاول انك تفوز او ماتخلي احد يصدمك wreckfest اللعبة اسمها طبعا الدمج بيكون على حسب السرعة الي تمشي فيها واللعبة فيها نظام تعديل يعني كفرات ضد الانزلاق ونيترو وتقدر تزود السيارة وتركب صدامات كل الي ذكرته قابل انك تسويه باللعبة بسهولة تامه , القيم سهل انك تسويه بس راح تحتاج مصمم مابات يصمم لك وتقدر تضيف غرف او بمعنى تخلي كل ماب منعزل عن الثاني طبعا راح تحتاج الدمنشن عشان تفرد الاعبين بمعنى اصح لو فيه 30 لاعب يلعبون بماب معين واللعبة بدأت وجا زيادة 5 لاعبين يحتاجون يلعبون في نفس الماب انت هنا تحط الماب والاعبين بدمنشن معين وتبدأ اللوبي تستخدم الوظيفة الي طرحتها سابقا عشان تجيب دمنشن فارغ وبس والله , طبعا انا كان ودي اسوي القيم بس قدر الله ماشاء فعل والي عنده زيادة على الفكرة او فكرة احسن يحطها عشان يستفيد الجميع وبالتوفيق ان شاء الله
  27. 10 points
    السلام عليكم ورحمه الله وبركاتة اليوم الشرح عن فنكشن مهم ومعظم المبرمجين ما يدور عنوا executeBrowserJavascript صفحة الويكي | Wiki Page : https://wiki.multitheftauto.com/wiki/ExecuteBrowserJavascript اولا : ما هو معني الفانكشن ؟؟ html الفنكشن عبارة ينفذلك امر من لغه الجافا سكريبت علي صفحة اكيد ما فهمت شئ بوضحلك ------------------------------------------------------------------------------------- ملاحظات لاستخدام الفانكشن : 1 - اول واهم شئ انك تكون عارف شوية للجافا سكريبت 2 - لا يمكنك استخدام الوظيفة الا مع الصفحات المحلية يعني مينفعش تعمل الوظيفة دي مع صفحة جوجل مثلا 3 - يجب ان تعلم ان الفانكشن لا يشتغل الا علي الصفحات المحلية المعرفة في الميتا لنتعتبر ان اسم صفحتك call.html meta.xml اذن هنستدعيها كدا في ملف الميتا <file src="call.html" /> تقوم باستدعاء الصفحة داخل السكريبت حقك ( في ملف الكلنت طبعا لانوا متصفح ) url = "http://mta/"..getResourceName(getThisResource()).."/call.html" وبكدا url = رابط صفحتك ( call.html اللي هي ) اولا : تنشا متصفح yourBrowser = guiCreateBrowser(...) ثانيا : تحمل الرابط لما المتصفح يتنشا addEventHandler( "onClientBrowserCreated", theBrowser, -- ايفينت عبارة عن اول ما المتصفح يتنشا يحصل الفنكشن function( ) -- فنكشن loadBrowserURL( source, url ) -- تحميل رابط الصفحة حقتنا end -- انهاء الفنكشن ) -- اغلاق الايفينت ------------------------------------------------------------------------------------- بس لازم تعرف شرح الساينتكس بتاع الفنكشن bool executeBrowserJavascript ( browser webBrowser, string jsCode ) webBrowser : المتصفح بتاعك jsCode : كود الجافا سكريبت بتاعك ( الوظيفة لو الارقيومنات بتاعتها صحيحة بترجعلك قيمة وهي ترو ولو العكس او حطيت متصفح فية رابط موقع غير محلي بيرجعلك فولس) : ملحوظة _____________________________________________________ تمام كدا فهمنا الساينتكس ونشوف شوية امثلة المثال الاول :اظهار اسم الاعب عند كتابة 1 في اف 8 call.html <html> <p id = "msg"> hello </p> </html> client.lua( او ايا كان اسمة المهم انوا يكون ملف كلينت ) local jsCode = 'var p = document.getElementById("msg") ; p.innerHTML = "hello" + " '.. getPlayerName(localPlayer)..'"' local screenWidth, screenHeight = guiGetScreenSize( ) local window = guiCreateWindow( 0, 0, screenWidth-200, screenHeight-300, "Web Browser", false ) local browser = guiCreateBrowser( 0, 28, screenWidth-200, screenHeight-300, true, false, false, window ) local theBrowser = guiGetBrowser( browser ) addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://mta/"..getResourceName(getThisResource()).."/call.html" ) end ) addCommandHandler( '1' , function( ) executeBrowserJavascript( theBrowser , jsCode ) end ) المثال الثاني : اخراج الكلام الموجود في مربع الكتابة بتاع صفحة الويب علي شات اللعبه call.html <html> <input id='edit' ; type='text' /> </html> client.lua local jsCode = [[ var editBox = document.getElementById( 'edit' ) function onPressEnter() { if( event.keyCode == 13 ) { mta.triggerEvent("output",editBox.value) } } editBox.addEventListener("keypress", onPressEnter ) ]] local screenWidth, screenHeight = guiGetScreenSize( ) local window = guiCreateWindow( 0, 0, screenWidth-200, screenHeight-300, "Web Browser", false ) local browser = guiCreateBrowser( 0, 28, screenWidth-200, screenHeight-300, true, false, false, window ) local theBrowser = guiGetBrowser( browser ) addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://mta/"..getResourceName(getThisResource()).."/call.html" ) end ) addEventHandler( 'onClientBrowserDocumentReady' , theBrowser , function() executeBrowserJavascript(source,jsCode) end ) addEvent( 'output' , true ) addEventHandler( 'output' , root , function( msg ) outputChatBox(msg) end ) _______________________________________________________________________________________________________ المثال الثالث : عبارة عن انشاء وتغير لون الماركر من خلال صفحة ويب داخل اللعبه call.html <html> <p id = "msg"></p> <script> function func() { var c = event.keyCode if( c != 44 && c != 45 ) { if( c < 48 || c > 57 ) { event.returnValue = false } } if( c == 13 ) { mta.triggerEvent( 'createMarker' , document.getElementById("edit_Box").value ) } } function func2() { var c = event.keyCode if( c != 44 ) { if( c < 48 || c > 57 ) { event.returnValue = false } } if( c == 13 ) { mta.triggerEvent( 'changeMarker' , document.getElementById("color_Box").value ) } } </script> <strong><em>Enter Marker Position Here !! : </em></strong><input id = "edit_Box" style = "color:red" ; type = 'text' size = "50" onkeypress = "func()"> </input> <hr> <p id = "msg2"></p> <strong><em>Enter Marker Color Here !! : </em></strong><input id = "color_Box" style = "color:orange" ; type = 'text' size = "50" onkeypress = "func2()"> </input> </html> client.lua local screenWidth, screenHeight = guiGetScreenSize( ) local window = guiCreateWindow( 136, 131, 824, 468, "Web Browser", false ) local browser = guiCreateBrowser( 0, 28, screenWidth-200, screenHeight-300, true, false, false, window ) local theBrowser = guiGetBrowser( browser ) guiSetVisible( window , not guiGetVisible(window) ) visible = guiGetVisible(window) showCursor(visible) guiSetInputEnabled(visible) _Markers = { } addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://mta/"..getResourceName(getThisResource()).."/call.html" ) end ) setDevelopmentMode(true,true) addEvent( 'createMarker' , true ) addEventHandler( 'createMarker' , root , function( position ) if( #position == 0 ) then executeBrowserJavascript( theBrowser , 'document.getElementById("msg").innerHTML = "<b><i><u>يرجي كتابة احداثيات الماركر</u></i></b>" ; document.getElementById("msg").style.color="red"' ) if( isTimer( ti ) ) then killTimer( ti ) end ti = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg").innerHTML = "" ; document' ) return end local pos = split( position , ',' ) mark = createMarker( pos[1] , pos[2] , pos[3] , 'cylinder' , 1 ) if( isElement(mark) and getElementType(mark)=='marker' ) then if( type( pos ) == 'table' and #pos == 3 ) then executeBrowserJavascript( theBrowser , 'document.getElementById("msg").innerHTML = "<b><i><u>تم انشاء الماركر بنجاح</u></i></b>" ; document.getElementById("msg").style.color="green"' ) if( isTimer( ti ) ) then killTimer( ti ) end ti = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg").innerHTML = "" ; document' ) _Markers[#_Markers+1] = mark else executeBrowserJavascript( theBrowser , 'document.getElementById("msg").innerHTML = "<b><i><u>يرجي كتابة احداثيات صحيحة</u></i></b>" ; document.getElementById("msg").style.color="red"' ) if( isTimer( ti ) ) then killTimer( ti ) end ti = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg").innerHTML = "" ; document' ) return end else executeBrowserJavascript( theBrowser , 'document.getElementById("msg").innerHTML = "<b><i><u>يرجي كتابة احداثيات صحيحة</u></i></b>" ; document.getElementById("msg").style.color="red"' ) if( isTimer( ti ) ) then killTimer( ti ) end ti = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg").innerHTML = "" ; document' ) return end end ) addEvent('changeMarker',true) addEventHandler( 'changeMarker' , root , function( color ) if( #color == 0 ) then executeBrowserJavascript( theBrowser , 'document.getElementById("msg2").innerHTML = "<b><i><u>يرجي كتابة لون الماركر</u></i></b>" ; document.getElementById("msg2").style.color="red"' ) if( isTimer( t2 ) ) then killTimer( t2 ) end t2 = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg2").innerHTML = "" ; document' ) return end RGB = split(color,',') if( _Markers[#_Markers] and isElement( _Markers[#_Markers] ) and getElementType( _Markers[#_Markers] ) == 'marker' ) then if( type( RGB ) == 'table' and #RGB == 3 and tonumber(RGB[1])<=255 and tonumber(RGB[1])>=0 and tonumber(RGB[2])<=255 and tonumber(RGB[2])>=0 and tonumber(RGB[3])<=255 and tonumber(RGB[3])>=0 ) then executeBrowserJavascript( theBrowser , 'document.getElementById("msg2").innerHTML = "<b><i><u>تم تغيير لون الماركر بنجاح</u></i></b>" ; document.getElementById("msg2").style.color="green"' ) setMarkerColor( _Markers[#_Markers] , RGB[1] , RGB[2] , RGB[3] ) if( isTimer( t2 ) ) then killTimer( t2 ) end t2 = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg2").innerHTML = "" ; document' ) return else executeBrowserJavascript( theBrowser , 'document.getElementById("msg2").innerHTML = "<b><i><u>يرجي التأكد من البيانات</u></i></b>" ; document.getElementById("msg2").style.color="red"' ) if( isTimer( t2 ) ) then killTimer( t2 ) end t2 = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg2").innerHTML = "" ; document' ) return end else executeBrowserJavascript( theBrowser , 'document.getElementById("msg2").innerHTML = "<b><i><u>قم بأنشاء المأركر اولأ</u></i></b>" ; document.getElementById("msg2").style.color="red"' ) if( isTimer( t2 ) ) then killTimer( t2 ) end t2 = setTimer( executeBrowserJavascript , 2000 , 1 , theBrowser , 'document.getElementById("msg2").innerHTML = "" ; document' ) return end end ) bindKey( 'f7' , 'down' , function( ) guiSetVisible( window , not guiGetVisible(window) ) visible = guiGetVisible(window) showCursor(visible) guiSetInputEnabled(visible) end ) addCommandHandler( '1' , function( ) local x , y , z = getElementPosition( localPlayer ) setClipboard( x..','..y..','..z ) end ) addCommandHandler( '2' , function( ) if( _Markers[#_Markers] and isElement( _Markers[#_Markers] ) and getElementType( _Markers[#_Markers] ) == 'marker' ) then destroyElement( _Markers[#_Markers] ) _Markers[#_Markers] = nil local just = { } for i , data in pairs( _Markers ) do if( data ) then table.insert( just , data ) end end _Markers = just data = nil ; just = nil end end ) _______________________________________________________________________________________________________ >> { لأي استفسار تفضل في التعليقات في الاسفل } << ____________________________________ المصادر ____________________________________ https://wiki.multitheftauto.com/wiki/ExecuteBrowserJavascript https://www.w3schools.com/js/ https://wiki.multitheftauto.com/wiki/OnClientBrowserDocumentReady https://wiki.multitheftauto.com/wiki/OnClientBrowserCreated ______________________________________________ من قاموا بمساعدتي Who helped me ______________________________________________ @IIYAMA @botder ______________________________________________ الاهداءات @Master_MTA @!#DesTroyeR_,) @Default#^ @#,xiRocKyz @NX_CI @TOUNSI | ا̍ڸــڛۣــ؏ــٰٱ̍دہ @DABL @Kareem Amer والباقي في القلب
  28. 9 points
    About We hear you, “another role-play server? Guess it’s an edit again” – but that’s not the case. Advanced Gaming is, back again, getting things ready to provide our loyal players with what we do best: next level scripts with a nice balance between realism and fun in each and every script. With at least 10 years of experience on the MTA platform and countless sleepless nights, we present to you: A role-play script written from scratch! If you remember us from back in 2015, hi there! If you don’t, no worries. We’ve been here before and life got in the way, we took over a project (SAPD:FR) which required less of our attention and made it possible for us to get a few things straight as a community but also in our personal lives. Now that we're back we're more than ready to finally put full dedication into this project and bring you guys a brand new twist into the MTA:SA Roleplay scene with a brand new script with some never before seen features, so without further ado let's go on with what we have to offer! Features Since a role-play gamemode requires constant changes, new features and removal of features... we’re not going to list all of our features (we know, it’s a lot, we all hate reading). To give you a glance of what we got to offer, we would love to invite you to our server and just give it a shot (when it’s released), if you want to know what our deal is, here’s a glance of what we got to offer: Realistic Vehicle System: We've put countless hours into the details of our vehicle system which allowed us to implement numerous hidden features which we will not yet release to the public, they'll sure blow your mind when you find out about all of it. After hours and hours of study and at least 4 years of experience we've made a perfect balance between the game's engine and physics system to carefully recreate real-life vehicle models in-game regarding handlings which includes top speeds, accelerations, realistic fuel tank capacities and consumptions. FPS-friendly UI: We’ve written our very own custom GUI (graphical user interface) system to create windows, labels, images and what not with ease without frying your CPU and GPU. Balanced Economy: Our economy has been built in a way to promote player to player interaction. How so? Simple, you can forget about getting rich by doing the default jobs, if you want to get yourself some more cash then you're simply going to have to join one of many player ran companies or perhaps even go down the dark path and join a gang? That's up to you, we won't tell anyone and especially not the cops! Jobs and companies, how do they work?: Simple, the entire server will be running on companies instead of default jobs. The default jobs have been made useful for new players (deliveries from our very own storage units, a government funded bus or a taxi driver) but the real fun starts with real people, in real companies. Hurr Durr I’m a big guy on another server, can I..: let me stop you right there, we don’t care about your previous progress on other servers, your entire track list of bans and offenses. Everyone is fair and square as a new player on our server, no advantages and no labels. Items and products: From snacks to meals, from coca-cola cans to glasses of wine, property keys to theory certificates. We've got it all built in with effect, if any. Users are able to purchase some items, other items have to be earned. You'll get a theory certificate after completing your theory for a driving license, a receipt after purchasing something or an empty can after drinking your coca cola. Illegal activities / gameplay: It’s a tough scene, you want to start your own gang or clap your neighbors, we get it. Since the illegal role-play defines or breaks a server, we’re taking close care of the scene with constant monitoring with a team of people. Guns will be distributed passively, drugs will be taken care of (and tested before distribution…). In the trash(bin)! Attention to detail in every script, want to get rid of the annoying receipt you recieved from the store and don't even need it? Simply throw it into one of the many trash bins present around town and let the garbage collectors take care of your junk for you! Police & Criminals: Tired of officers having super cars, heavy duty weapons like AR-15 or server owner-run departments? So are we, which we why we've given the department normal vehicles with fitting handlings which decreases their advantage, increases the experience of both roleplaying as well as the thrill of being a criminal or officer. They're forced to think tactically and plan their actions, their equipment is distributed on a monitored basis to only the higher ranks in the department where we see fit. Giving the illegal roleplay scene space to grow and feel alive And much more!: You want more? We got more! Two number 9s, a number 9 large, a number 6... oh, you meant features? We have a tight schedule of daily bugfixes, weekly updates and weekly announcements regarding progress. Want to see what we're made of? Check us out.. when we've launched! (sorry, I know..) Screenshots Note: This is still Work in Progress, final product may look different! DMV System Trash Bin System Shopping Vehicle Plate System - more info here. Other Where to find us? Since we’re still getting things ready, you’re more than welcome to join us on our discord server. We’re working on the forums, lots of script changes and making sure that you’re getting something new and fun, rather than just another edit. Server IP: Still in development, release date on Friday, April 17 at 21:00 GMT+2 (20:00 for faction leaders) Website: mta.advanced-gaming.org Forums: forum.mta.advanced-gaming.org Discord: https://discord.gg/g3ytB7h Launch Date: Friday, April 17 at 21:00 GMT+2 (20:00 for faction leaders) Note: This thread was written using the Dark Theme, if you spot any issues on the default theme please let us know!
  29. 9 points
    As one of the developers behind SAES:RPG, the server in question appears to not use any leaked scripts from SAES:RPG (I did a brief check). And it's not like SAES has patented / has a trademark on the idea of our gamemode, so anyone is free to make a gamemode in the same general spirit / idea. With that said, I wish you guys the best of luck.
  30. 9 points
    السلام عليكمم ورحمةة الله وبرككاتههء كيف الححال؟؟ بما إن الحساب الاول مدري ما يبغي يفتح سويت واحد جديد المهم .. سويت مود جديد واخذ الفكرة من مود السوات الى عن طريق المؤشر يسحب ويقتل كذا بس بفكرة ثانية ,, هي ان تحدد علي اللاعب بالماوس وتضغط كليك يمين تسحب كل الرتب حقته وتعطيه رتبة اسمها Admin_Ex يمديك تغير اسم الرتبة من الكلينت وتضغط كليك يسار تفك مخالفته وتسحب منه رتبة الادمن اكس وطبعا فيه حماية من سحب رتب الكونسيل , خلينا نشوف صور طبعا المؤشر يظهر للي معه رتبة اسمها Acl_Ex ويفتح عن طريق الضغط علي حرف M نجي للـتحميل اضغط هنا لتحميل السكربت لازم تحط المود بقروب الأدمن علشان يسحب رتب ويعطي مخالفة * رأيكم يهمني.. إهداء لـ @!#NssoR_) @!#DesTroyeR_,) @N3xT @+Source|> @Mr.Solo @Kareem Amer @Abdul KariM ولكل الموجودين #-
  31. 9 points
    Introduction Vehicle indicators are mostly seen on other GTA modifications where the mod 'IVF - Improve Vehicle Features' is compatible. This mod allows for light modifications such as police flashlights, custom LED flashers, indicators and much more. These features are sought after by MTA roleplaying servers a lot. This guide aims to introduce 3D modelers to prepare models for customisable lights, which then requires coded shaders to work. Anything related to scripting is not included in this guide. The guide assumes that the modeler has basic understanding of importing and exporting models. Editing existing Huntley for indicator lights With Huntley imported into 3ds Max, isolate the mesh called 'chassis' as it is the only component that needs working lights. As seen the car has 4 lights; right tail light, left tail light, right headlight and left headlight. All 4 has their own material assigned for them to act each their own way. The material color codes are hardcoded in the game telling it when to show illuminated brake lights for when the car brakes and so on. For this custom vehicle however, any geometry meant for custom vehicle lighting needs white color code and a custom texture name for shadering to work. Before anything, it's required to get the custom lighting texture ready. For this guide, vehiclelights128 and its illuminated version works perfectly fine. These needs be renamed to customRRLightsOff and customRRLightsOn and so forth. The 'RR' is for 'right rear', where as 'LR' would be 'left rear'. This needs be done for front too, so in total 4 'off' images are needed while only one 'on' is needed, as it can simply be instanced when shadering. Below is a step-step process on editing Huntley's geometry and adding custom indicators. Add an 'Editable Poly' modifier to the model. Press '5' key on keyboard which enables 'Select by Element'. Select the two rear light meshes, ensure they are both highlighted. On 'Modify Panel' scroll down and find 'Slice Plane', click that. This creates a rectangle that has a line-preview for the cut. Align the plane to the lights and create two cuts for the indicator lights. Select one side of the geometry that was cut by using 'Select by Polygon'. On the modifier stack, click 'Collapse all', leaving only 'Editable mesh' on the stack. Press 'M' key for 'Material browser'. Create a new GTA material. In the texture slot, add in the 'customRRLightsOff'. On material browser, click 'Assign material to Selection'. Note that this needs be done for the left side too but with different material and texture. Apply a new modifier on the model called 'Unwrap UVW'. Press 'Open UV editor'. On the UV editor, enable 'Select by polygon'. Grab the UV island and drag it onto the orange section of the image, which is for indicator lights. On modifier stack, collapse all, to save the new UV's. Above: example of what can be achieved. Front lights section already has indicator lights, so all that needs doing is 2 new materials with each their own light texture, like done on rear side. The 4 new textures needs be added to the car's .txd file. Model is now ready for export. Now all that's needed is MTA scripting for the light shaders to work. Exact same process can be applied for creating custom emergency lights. Note that it is not necessary to have these 128x128 textures in the model. They can be downscaled to 4x4 in the .txd and then a MTA shader script can apply the originals, which greatly reduces the size of download. This means it'll download 4 images which are then instanced onto every custom model using the lights. To put it short, each .txd will have 4 placeholder-images of 4x4 resolution rather than 4 images of 128x128 resolution.
  32. 9 points
    السلام عليكم ورحمة الله وبركاته تعديل من لوحة ادمنية اضغط على settings اكتب o هتطلع اسمAdminMsg مثلا AdminMsg [name] [text] ومنها انت تقدر تغير اي اسم ِ وفي هذه البرنامج قمت ببعض التعديلات مثل إضافة إظهارأو إخفاء كلمة السر وتذكرني و اختيار اللغة عربي او انجليزي وهنا في خانة send عند text تقدر تكتب اي نص ولو طويل جدا يمكنك ان تراه باكمله Options وهنا في هذه الصورة عند تحـريك المربع اللي باللون الازرق بأي اتجاه تريده وتكبير وتصغر المربع وكذلك تكبير وتصغير الخط للتحميل من هــــنــــا وشكرا ارجوا ان ينال رضاكم
  33. 9 points
    تم جلد الجميع ولم ينجو الا القليل @Default#^ @#_iMr,[E]coo @ibrahim# @#[K]iLLeR<3 @!#NssoR_) @Master_MTA @iMr.WiFi..! @NX_CI @N3xT @Rakan# @ميدوح @#SnpêŘ @KillerX @#StrOnG_,) @SuperX @#x1AhMeD-09 @Anis @[T]|O|[P]George @#BrosS @DABL
  34. 9 points
    أ، ب، ت، ث، ج، ح، خ، د، ذ، ر، ز، س، ش، ص، ض، ط، ظ، ع، غ، ف، ق، ك، ل، م، ن، هـ، و، ي تصير لي جارية ؟
  35. 9 points
    Olá pessoal. Fiz um vídeo explicando as regras atualizadas do nosso fórum Português, além de como funciona e pra quê serve cada seção. Assistam ao vídeo antes de postar qualquer coisa em nosso fórum, o vídeo também tem algumas dicas pro pessoal que já faz parte da comunidade. Dúvidas, críticas, sugestões deixem nos comentários deste tópico ou então nos comentários do vídeo. Se inscrevam lá pra dar aquela força. Deixe também seu like no vídeo e neste post. Obrigado a todos. Conteúdo do vídeo: 0:53 - Regras e recomendações do fórum 2:01 - As seções do sub-fórum Português: 2:04 - Seção "Tutoriais em geral" 2:25 - Seção "Programação em Lua" * Formatando o Tópico * Criando um bom conteúdo pra mensagem * Conselhos e recomendações gerais * Use o botão <> para postar o seu código com a devida formatação 6:57 - Seção "Mapas Para MTA:SA" 7:09 - Seção "Ajudas relacionadas ao MTA:SA (Cliente/Servidor)" 7:30 - Seção "Servidores para jogar" 7:59 - Seção "Serviços de hospedagem" 8:13 - Seção "Offtopic" 8:28 - Suporte relacionado a banimento em servidores não são aceitos no fórum do MTA * NOTA: Para suporte com Ban global no MTA, seu tópico deve ser postado na seção internacional Ban appeals. APENAS para bans permanentes. Se for temporário, por favor, aguarde até que o ban expire. 8:53 - "Reviver" o tópico 9:18 - Sistema de reputação do fórum 11:03 - Tenha uma boa conduta no fórum 11:16 - Postagens em Português DEVE ser no sub-fórum Portuguese / Português 11:59 - Conselhos para quem ajuda no fórum 12:39 - Boas práticas de programação
  36. 9 points
    الله يأخذ من أسس المنتدى .. ويأخذ مشرفين وأعضاء وعضوات المنتدى ....السلام عليكم ورحمة الله وبركاته ::لو أن السلام مو سنة كان ما سلمت ..!! قولوا ...آمــــــــــــييين الله ياخذ من أسس المنتدى ..ويآخذ مشرفين المنتدى...ويأخذ مشرفات المنتدى ...وياخذ أعضاء المنتدى ...ويآخذ عضوات المنتدى ...وياخذ زوار المنتدى ...وياخذ من يقرأ الموضوع ..وياخذني معاهم ..........:::: إلى ::::...........جنـــــــة عرضها السماوات والأرض ..لا هرم فيها ولا مرض لا تعب فيها ولا نصب ..لا هم فيها ولا وصب .. لا خوف فيها ولا هلعلا سأم فيها ولا جزع ......:: .. بعد عمـر طويـــــل مديــــد على الطاعة بإذن الله ..::.......آمــــــــــــــــــــيين ...
  37. 8 points
    Project trains This resource creates multiple trains driving around the map and make them drive automatic. It makes San Andreas a little bit more alive. You can set-up how much trains are created, how fast they go, minimal/maximal amount of trainscarts they are pulling and some more. Versions Version 1.0.0 Serverside time synced trains for multiplayer Admin panel settings Version 2.0.0 Uncompiled Better optimised than previous versions. CPU (3,5-3,9 GHz) 4 trains +/- 1.22% usage 40 trains +/- 7.05% usage Overkill Cleaned up a lot of the old code (I wrote this in 2015.. , never the less it is still ugly :C) Added some custom train-cart designs. Fixed all known bugs. Trains won't stop, even in this version. But you can try to make that yourself... Improved bandwidth You can design your own traincarts in the map editor, see documentation after clicking on the lazy download link Bugs: GTA spawn bug: Incorrect train spawn, see documentation. Repository Lazy <you> transport Armed to the teeth Admin panel settings Building your own traincarts with the map editor Download here - project trains 2.0.0
  38. 8 points
    Eai pessoal tudo bom? Eu percebi que muitas das duvidas que o pessoal posta aqui no fórum e também na comunidade, são duvidas muito simples, principalmente com erros de logica, ou mau uso dos recursos da linguagem. Então decidi desenvolver um curso básico para auxiliar quem está começando, nesse curso básico vou abordar os seguintes assuntos: Lógica de Programação & Algoritmo; Condicionais & Variáveis (Básico); Sintaxe & Indentação; Boas Praticas de Programação; Como usar a Wiki; Funções(); Tabelas (Arrays); Scripts voltado ao MTA; Exercícios. Antes que venham falar "Quem é você para fazer um curso?", vou me apresentar: Eu me chamo Marcelo, trabalho com programação a cerca de 7 anos, já trabalhei com desenvolvimento, back-end e front-end. Atualmente eu trabalho na área de SI (Segurança da Informação) prestando serviço como pentester e consultor a uma empresa. Comecei a me envolver com Lua, por que joguei MTA por muito tempo, e percebi que a maioria dos servidores não atendia as minhas expectativas, então junto com um amigo, decidimos criar um novo servidor, o New Dream's Roleplay. Mas como o assunto aqui é o Tutorial, vou me ater apenas a ele, e deixo para falar do servidor outra hora. Lógica de Programação & Algoritmo Para deixar bem claro, vou usar as minhas definições das palavras durante o curso, porque acredito ser mais didática dessa forma. Antes de mais nada vamos deixar bem claro algumas coisas: Programação é lógica, a linguagem e etc, são apenas ferramentas para organizar e dar sentido a essa lógica. Portanto se você dominar a lógica de programação, poderá aplicar ela a qualquer linguagem. Tendo isso em mente, a aplicação da lógica podemos chamar de algoritmo. O Algoritmo por sua vez é uma sequencia de instruções, para a execução de uma tarefa. Claro que levando em consideração que o algoritmo conta com verificações, iterações e etc. Pois bem eu acredito que lógica só se aprenda fazendo, então vamos com alguns exemplos: Para facilitar a vida de alguns de vocês na compreensão, vou utilizar o Portugol como "linguagem" nesses exemplos, e recomendo que usem também nos exercícios. Para acessar o Portugol utilizem o link: http://lite.acad.univali.br/portugol/. Vamos começar pelo código mais repetido do mundo o "Olá Mundo" algoritmo OlaMundo; -- Aqui nos definimos o nome do Algoritmo inicio -- Aqui damos inicio ao mesmo imprima("Olá, Mundo!"); -- Aqui solicitamos que o Computador imprima a frase "Olá, Mundo!" fim -- Aqui encerramos Como podem reparar, toda a formação obedece uma lógica simples, você define, inicia, executa e encerra. Para termos um exemplo mais lúdico, vou usar linguagem padrão e descrever a seguinte situação: Acordar e sair para o trabalho. 01. Abrir os olhos; 02. Olhar o relógio; 03. Levantar da cama; 04. Ir ao banheiro; 05. Sair do quarto, e ir a cozinha; 06. Preparar o café da manha; 07. Sentar a mesa; 08. Comer o café da manha; 09. Lavar a louça do café da manha; 10. voltar ao quarto; 11. Vestir a roupa 12. Sair do Apartamento; 13. Descer o elevador; 14. Entrar no carro; 15. Ir ao trabalho. O exemplo acima é um algoritmo em linguagem padrão, quero que vocês percebam como ele utiliza uma sequencia lógica para executar uma tarefa. Agora, mais a frente iremos ver condicionais e verificações, mas já quero apresentar uma introdução sobre a mesma, nesse exemplo a cima, vamos adicionar uma verificação básica ali em cima na linha 02 01. Abrir os olhos; 02. Olhar o relógio CASO o relógio marque = 6:30 ENTÂO Faça a linha 03. CASO CONTRARIO espere até dar 06:30; 03. Levantar da cama; ... Nesse exemplo colocamos uma verificação simples, caso o horário seja o qual nos queremos, então vamos continuar com o algoritmo, isso é uma condição verdadeira ou falsa, e uma condição única, poderíamos adicionar outra condições por exemplo: 01. Abrir os olhos; 02. Olhar o relógio CASO o relógio marque = 6:30 && NÂO SEJA sabado OU domingo ENTÂO Faça a linha 03; 03. Levantar da cama; ... Aqui estamos adicionando outra verificação, e ambas precisam ser verdadeiras para que a sequencia se complete. Com esses exemplos em mente, vou deixar alguns exercícios para vocês, podem fazer tanto em linguagem padrão como em portugol (recomendo mais o portugol). 1. Acordar e ir ao trabalho; 2. Lavar o carro; 3. Um robô que pegue caixas; 4. Planejar uma viagem; 5. Jogar um jogo. Caso queiram, podem postar o código nesse tópico, e caso tenham alguma duvida, deixem logo a baixo. Só lembrando ao pessoal que já entende do assunto, ou pelo menos sabe o básico, vamos ajudar quem ta começando, todo mundo começou sem saber quase nada. Parte 02:
  39. 8 points
    بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاتة أخبار الشباب عساكم طيبين , اول مساهمة تقريبا وثالث موضوع لي المهم حبيت اطرح ماب الاستراحة لسيرفر كنق الطارة الماب محوله من 2018 وركبته بالسيرفر تقريبا سنه وشوي وقررت اطرحه للعموم وأحول شيء جديد المهم مالكم بالطويلة الماب من تصميمي والمجسم من تحويلي والتكستر من اختياري الماب جاهز ماعليك الا انك تركبة بالاستضافة وتشغله والتعديل مفتوح سواء عالصور او اضافات عالمجسم ورجاءا حفظ الحقوق صور للماب او المجسم مادري اذا الصور بتظهر زمان عالمنتديات طبعا المركبات الي بالصور مو من ضمن الماب ذي عشان تعطي موارد للصورة رابط تحميل الماب و المجسم لااله الا الله,محمد رسول اللة وسلامتكم فأمان الله ورعايته حسابي انستقرام :jn_i ip Server: ......
  40. 8 points
    Dear MTA community, I have been spending my last 8 weeks on mathematical problems. One of them is the 3D Frustum-Plane intersection that is used by GPUs to draw triangles onto your screen. If you want to learn more about this please consider reading this thread. Promotional Video: https://www.youtube.com/watch?v=RQy3Q4Xe110 Prerequisites This tutorial is aimed at people who are capable of scientific thinking and are willing to playfully learn with Lua code. To execute steps in this tutorial minimal knowledge of Linear Algebra and Lua is required. Required MTA Resource: https://github.com/quiret/mta_lua_3d_math Description of the math Imagine that we have got a frustum and a plane in a 3D room described by coordinates plus their boundaries. By intersecting both you obtain all coordinates on a screen along with their depth values. Now think about how your vision works. You see distant objects smaller than closer ones. You rotate your eyes to angles of vision. If we were to put this concept into terms of math we could say: the plane of vision is bigger in the distance than in close proximity. The frustum is a seamless row of vision planes starting from the pyramid tip to the bottom. How to use the MTA Resource Just download the GitHub repository into a folder of your MTA Resources, name it "math_3d_nonlin" and start it. You can execute the following commands for quick testing: send_bbuf: draws a simple depth test draw_model: draws the DFF file "gfriend.dff" Now we have got the basics out of the way. Time to start coding. Please create a new "_math_test.Lua" script file in the resource and include it server-side at the bottom of meta.xml. Tutorial: software rendering a plane on screen Open your _math_test.Lua and include the following code: local viewFrustum = createViewFrustum( createVector(0, 0, 0), -- position createVector(10, 0, 0), -- right createVector(0, 0, 10), -- up createVector(0, 20, 0) -- front ); local plane = createPlane( createVector(-3, 10, -3), createVector(6, 0, 0), createVector(0, 0, 6) ); local function task_draw_scene(thread) local bbuf = create_backbuffer(640, 480, 255, 255, 0, 50); local dbuf = createDepthBuffer(640, 480, 1); local time_start = getTickCount(); do local gotToDraw, numDrawn, numSkipped = draw_plane_on_bbuf(viewFrustum, bbuf, dbuf, plane, true); if ( gotToDraw ) then outputDebugString( "drawn " .. numDrawn .. " pixels (skipped " .. numSkipped .. ")" ); end end local time_end = getTickCount(); local ms_diff = ( time_end - time_start ); outputDebugString( "render time: " .. ms_diff .. "ms" ); taskUpdate( 1, "creating backbuffer color composition string" ); local bbuf_width_ushort = num_to_ushort_bytes( bbuf.width ); local bbuf_height_ushort = num_to_ushort_bytes( bbuf.height ); local pixels_str = table.concat(bbuf.items); local bbuf_string = pixels_str .. ( bbuf_width_ushort .. bbuf_height_ushort ); taskUpdate( false, "sending backbuffer to clients (render time: " .. ms_diff .. "ms)" ); local players = getElementsByType("player"); for m,n in ipairs(players) do triggerClientEvent(n, "onServerTransmitImage", root, bbuf_string); end outputDebugString("sent backbuffer to clients"); end addCommandHandler( "testdraw", function(player) spawnTask(task_draw_scene); end ); Result: Try executing the "testdraw" command. At the top of file you see the definition of our frustum cone as well as a plane. By calling the function "draw_plane_on_bbuf" we put color information into bbuf for exactly the pixels that make up the rectangle. If you change the plane definition to... local plane = createPlane( createVector(-2, 10, -4), createVector(6, 0, 3), createVector(-2, 0, 6) ); you instead get this image: Try changing around the coordinates of frustum and plane to obtain different pictures! Tutorial: software rendering a triangle on screen Take the same code as in the tutorial above but change line 19 to: local gotToDraw, numDrawn, numSkipped = draw_plane_on_bbuf(viewFrustum, bbuf, dbuf, plane, true, "tri"); This way we have changed the primitive type to triangle (rectangle is the default). Try executing the "testdraw" command again to inspect the new result! Tutorial: drawing a DFF file onto screen Instead of writing triangle definitions by hand we can take them from a DFF file instead. DFF files are storage of triangle and vertex information along with 3D rotation and translation information. By extacting the triangles from the DFF file we can put them into our algorithm to software-render them! Here is a related excerpt from math_server.Lua: local modelToDraw = false; do local modelFile = fileOpen("gfriend.dff"); if (modelFile) then modelToDraw = rwReadClump(modelFile); fileClose(modelFile); end end local function task_draw_model(thread) local bbuf = create_backbuffer(640, 480, 255, 255, 0, 50); local dbuf = createDepthBuffer(640, 480, 1); local time_start = getTickCount(); local num_triangles_drawn = 0; if (modelToDraw) then -- Setup the camera. local geom = modelToDraw.geomlist[1]; local mt = geom.morphTargets[1]; local centerSphere = mt.sphere; local camPos = viewFrustum.getPos(); camPos.setX(centerSphere.x); camPos.setY(centerSphere.y - 3.8); camPos.setZ(centerSphere.z); local camFront = viewFrustum.getFront(); camFront.setX(0); camFront.setY(5 + centerSphere.r * 2); camFront.setZ(0); local camRight = viewFrustum.getRight(); camRight.setX(centerSphere.r * 2); camRight.setY(0); camRight.getZ(0); local camUp = viewFrustum.getUp(); camUp.setX(0); camUp.setY(0); camUp.setZ(centerSphere.r * 2); local triPlane = createPlane( createVector(0, 0, 0), createVector(0, 0, 0), createVector(0, 0, 0) ); local vertices = modelToDraw.geomlist[1].morphTargets[1].vertices; local triangles = modelToDraw.geomlist[1].triangles; local tpos = triPlane.getPos(); local tu = triPlane.getU(); local tv = triPlane.getV(); for m,n in ipairs(triangles) do taskUpdate( m / #triangles, "drawing triangle #" .. m ); local vert1 = vertices[n.vertex1 + 1]; local vert2 = vertices[n.vertex2 + 1]; local vert3 = vertices[n.vertex3 + 1]; tpos.setX(vert1.x); tpos.setY(vert1.y); tpos.setZ(vert1.z); tu.setX(vert2.x - vert1.x); tu.setY(vert2.y - vert1.y); tu.setZ(vert2.z - vert1.z); tv.setX(vert3.x - vert1.x); tv.setY(vert3.y - vert1.y); tv.setZ(vert3.z - vert1.z); local gotToDraw, numDrawn, numSkipped = draw_plane_on_bbuf(viewFrustum, bbuf, dbuf, triPlane, false, "tri"); if (gotToDraw) and (numDrawn >= 1) then num_triangles_drawn = num_triangles_drawn + 1; end end end local time_end = getTickCount(); local ms_diff = ( time_end - time_start ); (...) end The code first loads a DFF file called "gfriend.dff" and stores it inside the "modelToDraw" variable. Once you execute the "draw_model" command the code looks up the first geometry in the DFF file and fetches all triangles associated with it. The rendering camera is set up to point at the middle of the model. Then all triangles are drawn one-by-one. https://twitter.com/rplgn/status/1230650912345067520 Try swapping the DFF file for another one, like biker.dff, and examine the results! Maybe extract a different DFF file from GTA:SA and replace gfriend.dff with that one. External references: math calculation on paper example: https://imgur.com/gallery/rLvln3X German thread on mta-sa.org: https://www.mta-sa.org/thread/38693-3d-frustum-ebene-schneidung-in-Lua/ Do you have any questions related to the math or the implementation? Do not shy away from asking! I want to provide you with as much insight as I can.
  41. 8 points
    سلام عليكم ورحمة الله آخخبااركم ان شاء الله طيبين وعيد سعيد عليكم وينعاد عليكم بالصحه والفرح --------------‐----------------------- في هذا الموضوع عندي مود لوحة الانتقال الجديده ~~` افكارها قد تكون جديده الله اعلم 😅😅😅 لمعرفة كل شي عن المود في هذا الرابط / الفيديو  وبالتـــوفييقء ~~  |~ الإهداءات ~| @!#DesTroyeR_,) @MrKAREEM @Mr.Falcon @DABL @KillerX @NX_CI @[AcM] - Major . @MR_Mahmoud @Ahmed Ly @MR.Mosa @N3xT @Abu-Solo @SuperX @#BrosS @iMr.WiFi..! @Mr.CnTroL @Abdul KariM @Hakan @!#NssoR_) و جميع أعضاء المنتدى 
  42. 8 points
    MTA-Communication-Enchantment This is an enchantment that allows you to communicate between clientside and serverside a bit easier. If you know how to work with events, then you probably do not need this, but it has some nice features which allows you to sit back and write less code + achieve some nice results. Note: It is important to keep in mind that this is an enchantment. Which means it is just an layer on top of the basic functionalities of MTA. And most enchantments come with a cost, in this case that is bit of performance. I will keep the information of topic to the minimal, as I have written most of the information already on the repository. You can find the repository here. Examples Syntax Installation What can you do with it? Calling from clientside to serverside Client callServer("hello") Server function hello () outputChatBox("Hello client!") end Calling from serverside to clientside Server addCommandHandler("callclient", function (player) -- An addCommandHandler is needed, because the client hasn't loaded it's scripts yet. callClient(player, "hello") end, false, false) Client function hello () outputChatBox("Hello server!") end Ok, ok, that was boring. The next one this is a bit nicer! Hello are you there? Just Call-me-back... I miss(ed) you too Callback Client callServer( "callbackMe", "argument", function (argument) -- < This is the callback function outputChatBox(argument) end ) Server function callbackMe (argument) return argument .. " < I looked at it :)" end Callback + internal arguments Sometimes you have arguments that you simply can't send over. > functions Or arguments that shouldn't be send over. > LARGE quantities of database data Internal arguments can be used to pass information to a callback without exposing it to the other side(client/server). Client callServer( "callbackMe", -------------------------------- -- arguments that are send over "argument", -- -------------------------------- function (internalArgument, argument) -- < This is the callback function. outputChatBox(internalArgument) outputChatBox(argument) end, -------------------------------- -- arguments that are not send over "internalArgument" -- < internal argument -- -------------------------------- ) Server function callbackMe (argument) return argument .. " < I looked at it :D" end Ha! Serverside what is that? No need for complicated things! Communicate between clients without writing a single line of serverside. Magic! Note: There is serverside used behind the scenes, you just don't have to write it. Client function smile (player) outputChatBox((isElement(player) and getPlayerName(player) or "[unknown]") .. " has send you a: :)") local x, y, z = getElementPosition(localPlayer) setElementPosition(localPlayer, x, y, z + 100) end addRemoteClientAccessPoint(smile) -- < This function allows other clients to call this function. --------------------------------------- -- -- function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end -- Author: TAPL -- https://wiki.multitheftauto.com/wiki/GetPlayerFromPartialName -- -- --------------------------------------- addCommandHandler("smile", function (cmd, playerName) local player = getPlayerFromPartialName(playerName) if player then outputChatBox("Sending smile!") callRemoteClient(player, "smile", player) else outputChatBox("Can't find player!") end end) Turtle, I will wait for you to catch up. So don't worry, you are still cute. Await functions When a player has joined the server, he or she doesn't have download + loaded his scripts yet. This means that you can't deliver your love letter yet and all your work will be for nothing. But what if you don't have to worry about that? You can just wait now! Server addEventHandler("onPlayerJoin", root, function () callClientAwait(source, "testCallClientAwait") end) Client function testCallClientAwait () outputChatBox("Yes this works!") end Security Worried about security issues? Remote calls for C++/MTA functions have been blocked. There is a whitelist feature included, if enabled your code can only remote-call whitelisted functions. (this is disabled by default) Read the docs for that. Here and here
  43. 8 points
    سلام عليكم ورحمة الله آخخبااركم ان شاء الله طيبين ------------------------------------- في هذا الموضوع عندي مود متجر يشتغل بالنقاط يعني عندك نقاط تشتري بها اسلحه ودم ودرع الخخ لمعرفة كل شي عن المود في هذا الرابط / الفيديو وبالتـــوفييقء ~~  |~ الإهداءات ~| @!#DesTroyeR_,) @Kareem Amer @MrKAREEM @Mr.Falcon @DABL @KillerX @NX_CI @[AcM] - Major . @MR_Mahmoud @Ahmed Ly @MR.Mosa @N3xT @Abu-Solo @SuperX @#BrosS @iMr.WiFi..! @Mr.CnTroL @Abdul KariM @Hakan @!#NssoR_) @Simple. @Abdo Nour و جميع أعضاء المنتدى
  44. 8 points
    Introduction Particles and lights are found many places in the game. Cars has corona lights for their tail, brake and headlights, exhaust fumes and tire smoke. These are effects and can help boost the atmosphere. Adding these effects can be done with ease, however, those who wish to use specific tools may have to incorporate more tools to transfer the data between files. This guide aims to introduce GTA modders to 2d billboard effects (lights, splashes) and particles through use of 3ds Max and relevant tools. To get started, user must obtain a selection of programs and 3D scripts available from this topic: Kam's 2018 scripts, The Hero's RW importer/exporter (optional if using for object export; harder), Dexx's 2dfx export script, RWanalyze and tools for setting up texture files. Table of Contents Working with lights using Kam's 2018 script Working with lights and particles using RW script (and Kam's 2018 for data exporting) Common uses of 2dfx Working with lights using Kam's 2018 script The upgraded Kam's script has an in-built 2dfx tool for quickly adding lights to models. Below is presented a step-step guide on adding a blinking light to a cone ID 1238. Import trafficcone.dff from gta3.img using the Kam's 2018 script importer. Navigate to Create Panel > Lights > Standard > Omni Light. Spawn one at the top of the cone. Link the Omni to the model, so it is a child of the model. As seen on the image below, expand '2DFX' on the script GUI. With the Omni selected, click 'Get'. Now the light parameters can be set to the user's likings. Below is a detailed explanation of config. Once done, select model and the child light and click Export to DFF. Time to test! The following config and export settings are ideal but may be adjusted to individual user's preferences: Each setting explained: Presets: presets for easy setup of lights Set to selected lights: needs be clicked each time changes has been made to a light. Get: copies the selected light's information, allowing one to paste that onto other lights. Color: the color of the light. Corona size: the size of the physical corona light. Draw distance: distance in which the light can be seen from (in SA units). Light range: distance in which the light illuminates peds and vehicles. Corona name: light texture e.g traffic light, blood splatter, corona star. Show mode: enable for flashing and other effects. Reflection: gives the effect of the sun shining into a lens when looking at the light source. Shadow size: the size of the round transparent shadow. Shadow distance: the distance in which the shadow can be seen (e.g if object is 100 meters above surface, the shadow can be seen if set to 105 units) Shadow multiplier: intensity of the shadow. Shadow name: defines which texture is used for the shadow. Flags: defines light properties. Working with lights and particles using RW script (and Kam's 2018 for data exporting) Lights method The steps presented in Kams method needs be followed with export included. On 3ds Max with the RW version of the model (with Omni Light) ready, export the model with its child Omni Light using RW script. The RW version does not need any specific light data, it just needs a regular Omni Light as placeholder. The reason for having Kam's DFF version available is that it contains data that can be extracted from the Kam's file and imported into the RW file. With Kam's DFF and RW DFF in a folder, open RWanalyze. Open the Kam's DFF and spot the section named "2dfx [xxx bytes @ xxxxx] - [0x253F2F8]". To proceed, right click the highlighted section > Export Section Data (ctrl + e) > select project folder and name as 'cone'. Now, open the RW version and find the same section located approximately in same order in the hierarchy containing a Bin Mesh PLG. To proceed, right click the highlighted section > Add section > [0x253F2F8] 2dfx > Right click the new section > Import section data > Find and select 'cone' > save file. Particles method For adding particles to the model, Dexx's 2dfx tool is introduced to the user. This method is not tool specific and works with both KAM and RW exporters. In this case RW exporter is used. With the RW model in 3ds Max, go to Create Tab > Helpers > Dummy > create one at the top of the cone. Link it to the model so that it's the child of the model. Start Dexx tool. Click 'Add Particle Info (Dummy)'. Expand 'Setup / Edit Particles'. In 'Particle System' select 'Fire'. Click 'Apply to Dummy(s)'. Expand 'Export Effect Info'. Click 'Export Info' with only the dummy selected, not the model. Export to project folder and name file as 'fire'. Export the model with the dummy included. Now with RWanalyze, open the DFF that was exported and find the following section. To proceed, right click the highlighted section, click 'Add section' and find [0x253F2F8] 2dfx. Right click the newly generated section and click 'Import section data'. Find the file 'fire' and on RWanalyze click save. The model now contains a fire from the top of the cone. Common uses of 2dfx In GTA SA, lights and particles can be integrated into models regardless if they're world objects or vehicles. Thus it opens up a whole level and opportunities for modelers to improve visuals of their models. A few uses are compiled below. Street lamps Fireplaces Cars Sirens Fire simulations Structure lighting Aircraft blinking lights Traffic lights Fountains Cement mixers Farming utilities The possibilities are endless, although the rendering limits of corona images is 32. This explains why the Pyramid in Las Venturas has 8 lights on each 4 corners.
  45. 8 points
    I want to share this tool and method to optimize PNG files, which are used a lot in gamemodes. This topic will focus on a tool called ZopfliPNG (which I built from source and will provide a file download for) - refer to the bottom of this topic, step 2 for that. https://github.com/google/zopfli Because of the intensive usage of PNG in MTA, optimizing them will benefit total download size for players and performance. 1) use Paint.NET software (https://www.getpaint.net/) to resize your image's resolution (CTRL + R), for example half it with the power of 2, like 256 x 256 to 128 x 128. Depending on the type of image or how far whatever script zooms it, you can go beyond that and make it even lower. Use default settings for saving it, you don't have to worry about size optimization yet. Drawing a lot of high resolution images or textures will affect client performance, and cause lag on low-end PC's. So following this step is highly recommended. You can always gauge the quality outcome while you're saving it using a lower resolution. Note: you can skip this step, if you care more about file & DL size rather than client rendering/memory performance, or if the type or usage of your image(s) result in rapid deterioration in quality upon resizing. By not doing this, and sticking to the main subject of this guide, ZopfliPNG from step 2, you will keep the same quality but only get a file size reduction. After doing the initial optimization with Paint.NET, which is the part that matters to client (rendering) performance, you'd usually think that is the end of it, that the file size Paint.NET outputs (on the various saving profiles, like bit depths, you compare) is the best you can get. But you're wrong, since advanced software like ZopfliPNG can squeeze more out of it, notably most of all without any quality decrease. It's software that assembles PNG format compression from scratch, with all pixels matching 100%. So there's no reason not to do it, also if you didn't initially use step 1) about Paint.NET resizing/actual image tweaks. So, to get a lower size, it's not neccesary to compromise more of your image quality using editing, like resize even more in Paint.NET. So now to get to the point of this guide; 2) ZopfliPNG Download it from: LINK (click) Usage instructions are in the README.txt files in either 32-bit or 64-bit version folders. It's a command-line utility, you can use it in the simplest way by entering this into cmd from the binary's location (after copying your png files): This will optimize the file using default configuration, which guarantees 100% matching pixels (absolutely no worse quality) and usually a huge reduction in file size. As I mentioned in one of the notes, you will benefit also if you won't "pre-process" your PNG's using Paint.net, but only use ZopfliPNG, to not possibly impact your quality but still get a lower resources download size. As you can see here; I made sure to document its usage (README.txt) and included mass optimization (multiple files at once) .bat files, their usage also explained in README.txt. Unfortunately this is as close we can get to mass-optimizing files, because i built zopflipng.exe from original ZopfliPNG source code (https://github.com/google/zopfli) and it doesn't currently feature it in a more convenient way (without having to edit/specify ranges of file names to optimize). Here's some additional information on ZopfliPNG and why it is so groundbreaking over other compression tools: https://ariya.io/2016/06/using-zopfli-to-optimize-png-images https://blog.codinghorror.com/zopfli-optimization-literally-free-bandwidth/ No other tool can theoretically achieve this, let alone with 100% quality preservation. It's state-of-the-art technology. Edit (25th Dec 2019): updated ZopfliPNG binaries (re-built from latest official repository version)
  46. 8 points
    السلام عليكم و رحمه الله و بركاته اليوم حبيت اسوي مود سهل و خفيف بيساعد المبرمجين في البرمجه بشكل كبير طبعا كنت معتزل و لي سنه ما نزلت شي جديد فحبيت اسوي خير شويه المود عباره عن نظام صلاحيات للحسابات وش فايدته .... ؟ مثلا عندك لوحه و تبي تخليها لكم لاعب فقط تقدر تستعمل السكربت عشان تخصص اللوحه لحسابتهم فقط او مثلا عندك لوحه و بها ازرار كتير و مثلا تبي زر يكون خاص للاعب بكل سهوله تقدر تستعمل السكربت السكربت هدفه توفير الوقت + طبعا عدم استخدام طرق التحققات الشائعه بين المبرمجين الي احيانا تسبب مشاكل للسيرفر --------------------------------------------------------------------------------------------------------- Export Functions / الوظائف الي تستطيع استدعائها Server Side : createPremission deletePremission addPremissionToAccount removePremissionFromAccount Client/Server ( Shared ) : getAllPremissions isAccountHasPremission getAccountsWithPremission getPremissionTable isPremissionExist Client Side : getClientAccount ------------------------------------------------------------------------------------- شرح الوظائف : createPremission تستخدم هذه الوظيفه لعمل صلاحيه جديده Usage : createPremission ( premissionName ) premissionName = اسم الصلاحيه الي تباها deletePremission تستخدم هذه الوظيفه في مسح صلاحيه موجوده من قبل Usage : deletePremission ( premissionName ) premissionName = اسم الصلاحيه addPremissionToAccount تستخدم هذه الوظيفه لاعطاء صلاحيه للحسابات .. Usage : addPremissionToAccount ( AccountName , Permission ) AccountName = اسم الحساب Permission = الصلاحيه removePremissionFromAccount تستخدم هذه الوظيفه في مسح صلاحيه من حساب Usage : removePremissionFromAccount ( Account , Permission ) Account = اسم الحساب Permission = الصلاحيه getAllPremissions تجيب لك الصلاحيات الموجوده Usage : getAllPremissions () الوظيفه ترجع لك جدول فيه الصلاحيات الي موجوده isAccountHasPremission تتحقق اذا كان الحساب عنده الخاصيه او لا Usage : isAccountHasPremission ( AccountName , Permission ) ترجع القيمه boolean getAccountsWithPremission تجيب لك الحسابات الي عندها صلاحيه محدده Usage : getAccountsWithPremission ( Permission ) Permission = اسم الصلاحيه ترجع لك جدول فيه اسماء الحسابات الي عندها الصلاحيه ذي getPremissionTable تجيب لك الجدول الكامل للصلاحيات الجدول كالتالي : Permissions = { PermissionName = { Accounts ...... }, etc........... } isPremissionExist تتحقق لك اذا كان في صلاحيه بالأسم الي انت مسويه من قبل او لا Usage : isPremissionExist ( PermissionName ) getClientAccount تجيب لك اسم حساب اللاعب في الكلينت سايد Usage : getClientAccount ( Player ) لو اللاعب مو مسجل بيرجع لك قيمه guest -------------------------------------------------------------------------------------------- طبعا المود يحفظ الصلاحيات لو وقف المود و اشتغل مره تانيه .. *NOTE : لسا ملاحظ اني كتبت كلمه Permission غلط معلش مخدتش بالي رابط التحميل : PERMISSIONS SYSTEM Ver: 1.0.0 المود مو مشفر للي حابب يتعلم كدا كدا المود مخصص للمبرمجين :- UPCOMING SCRIPT / السكربت القادم Resources Manager ( V3 )
  47. 8 points
    سلام عليكم ورحمة الله آخخبااركم ان شاء الله طيبين ------------------------------------- في هذا الموضوع عندي مود نظام البنك ~~` افكاره ليست جديده مره 😅😅😅 ولكن حاولت اجيب افكار عندك مثلا لما تودع فلوس او تسحب يشتغل صوت + يتحرك البيد اللي يشتتغل بالبنك هذا افضل وصف ض2 لمعرفة كل شي عن المود في هذا الرابط / الفيديو  وبالتـــوفييقء ~~  |~ الإهداءات ~| @!#DesTroyeR_,) @MrKAREEM @Mr.Falcon @DABL @KillerX @NX_CI @[AcM] - Major . @MR_Mahmoud @Ahmed Ly @MR.Mosa @N3xT @Abu-Solo @SuperX @#BrosS @iMr.WiFi..! @Mr.CnTroL @Abdul KariM @Hakan @!#NssoR_) @Simple. و جميع أعضاء المنتدى 
  48. 8 points
    ســلام عليكم ورحمة الله إييشءء حالكم موضوع اليوم عن مود الايموشنات ~ طـبعـا المود مو حصري لأنه موجود في ونناسه ~ بس انا مسويه بشكل جديد فقط كل شيء عن المود موجود في هذا الرابط \ الفيديو بالتوفيق |~ |~ الإهداءات ~| #BrosS NX_CI iMr.WiFi..! N3xT Abdul KariM KillerX !#DesTroyeR_,) و جميع أعضاء المنتدى
  49. 8 points
    ســلام عليكم ورحمة الله أخبـآركم - عسساكـمء بخير موضوع اليوم عن لوحة الإهداءات ~ طـبعـا انا لا احتاج احد يجيني في التعليقات يقولي أن اللوحه تبع لسيرفر طاره ~ | gift | كلمة فتح اللوحه من اف 8 هي لتغيير الكلمة , من ملف اسمه sittingCG كل شيء عن المود موجود في هذا الرابط \ الفيديو وبالتـــوفييقء ~~ |~ الإهداءات ~| @!#DesTroyeR_,) @MrKAREEM @Mr.Falcon @DABL @KillerX @NX_CI @[AcM] - Major . @MR_Mahmoud @Ahmed Ly @MR.Mosa @N3xT @Abu-Solo @SuperX @#BrosS @iMr.WiFi..! @Mr.CnTroL @Abdul KariM و جميع أعضاء المنتدى
  50. 8 points