Leaderboard
Popular Content
Showing content with the highest reputation since 06/11/23 in all areas
-
Celebrating Two Decades of Gaming: SAES/VCES Community's 20-Year Milestone on Multi Theft Auto. Introduction: In the ever-evolving realm of online gaming, communities often rise and fall, yet some endure, leaving an indelible mark that spans decades. One such resilient community is the SAES Community, an integral part of the Multi Theft Auto (MTA) landscape for an impressive two decades. A Journey Through Time: Established in 2003 as VCES (Vice City Emergency Services), the community initially operated as a gang on a modest 32-player server, organizing weekly gang wars and competitions. However, as MTA:VC gained basic scripting support, the server gradually transitioned into an RPG game mode, and the gang evolved into a thriving community. SAES has maintained a steadfast presence in the MTA universe, consistently delivering an immersive and captivating gaming experience. Over the past 20 years, the community has undergone transformations, adapted to changes, and flourished, weaving a tapestry of cherished memories for its members. Diverse Gameplay: At the core of SAES lies an expansive array of gameplay options tailored to a diverse audience. Whether you revel in adrenaline-pumping car chases, strategic law enforcement operations, or the allure of the criminal underworld, SAES provides a dynamic platform catering to every gamer's preference. For those seeking a more relaxed experience, players can embrace simpler roles, such as being a lorry driver, mechanic or a medic, offering a variety of choices to suit individual playstyles. The versatility of gameplay ensures that SAES caters to both the thrill-seekers and those who prefer a more laid-back virtual existence. Community Engagement: Beyond the virtual realm, SAES transcends the typical gaming community; it's a family. Through forums, Discord channels, and regular events, members can connect, share experiences, and cultivate lasting friendships. The sense of community extends beyond the pixels on the screen, making SAES a welcoming space for gamers from all walks of life. Join the Celebration: As SAES commemorates two decades of gaming on Multi Theft Auto, now is the opportune moment to join the celebration. Whether you're a seasoned veteran or a newcomer eager to explore the vibrant world of MTA, SAES welcomes you with open arms. SAES will be hosting an event night on November 25, 2023, at 19:00 GMT, featuring in-game prizes and rewards. All players are invited to join. Server details: IP: 87.98.254.54 (mta.saesrpg.uk) Port: 4999 Alternative server details: (For those who cannot connect from Turkey) IP: 94.23.154.230 PORT: 4999 Visit the SAES website at https://saesrpg.uk to discover more about the SAES Community, explore diverse gameplay options, and connect with a community that has withstood the test of time. Here's to another 20 years of virtual adventures, friendships, and memories on Multi Theft Auto! https://discord.gg/saes-rpg-229936715383439361?event=1174300635726872587 Here are some screenshots from over the years.7 points
-
Multi Theft Auto:Source Roleplay By MittellBuurman Roleplay on brand new source_rp resources For over 10 years, a roleplay resource has taught a lot of young aspiring scripters how to move a gate. Your very first challenge. It has been the staple of the roleplay community, where thousands of server have greatly benefited of the capabilities, but also had to face it's limitations. On Jun 11 2022, I started this project. With the ambition to create a new brand new roleplay engine from scratch, with new techniques and features, all wrapped up in a complex database system that is built to last. Gamemode status: Development Expected Launch: tbd We are currently looking for members looking to participate in the dev_sandbox server. We are looking for testers. If you're interested in the build status of the server and like to participate. You can join our Discord here. IMPORTANT NOTE: The server is NOT ready for launch and is in Early development stages. A lot of features may not work as expected and should be reported. This page is still a work in progress and will be aptly updated. Image gallery5 points
-
1. We create an application in https://discord.com/developers/applications 2. We copy the application id: 3. Now we are making the script (start with creating a .lua file) --// discord_c.lua local app_id = "your_app_key_here" function ConnectRPC() setDiscordApplicationID(app_id) if isDiscordRichPresenceConnected() then local name = getPlayerName(localPlayer) iprint("RPC: Discord RPC is now connected") setDiscordRichPresenceAsset("your_app_logo_string", "Yey, this is my app logo") setDiscordRichPresenceButton(1, "Join Discord", "url_here") setDiscordRichPresenceButton(2, "Connect Server", "url_here") --// NOTE: you can show only 2 buttons setDiscordRichPresenceState("Playing") setDiscordRichPresenceDetails("Playing as: "..name) else iprint("RPC: Discord RPC failed to connect") end end addEventHandler("onClientResourceStart", resourceRoot, ConnectRPC) --// Now, we reset the rpc details so the status will not be bugged addEventHandler("onClientResourceStop", resourceRoot, function() resetDiscordRichPresenceData() end) 4. So, we have our discord_c.lua file and now we need to create the meta.xml <meta> <info author="YourName" description="YourResourceDescription" type="YourScriptType", version="1.0" /> <script src="discord_c.lua" type="client" cache="false" /> </meta> 5. In the console you can now type refresh and after start theResourceName3 points
-
Hello, you need to use toJSON to turn the table into a string to be able to save it, and then use fromJSON to turn it back into a table when you need to use it.2 points
-
I made an example maybe you can get an idea from it how it will work. If you go for toJson/fromJson if you dont have many achievements. local dbConn = dbConnect("sqlite","users.db") local users = {} achievements = {"NewOne","Top1%","TheKiller","OldOne","Nobody","NooB"} function CreateTableAchievements() dbExec(dbConn,"CREATE TABLE IF NOT EXISTS achievements (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,user TEXT,achievements TEXT)") end addEventHandler("onResourceStart",root,CreateTableAchievements) function onLogin(_,currentAcc) if currentAcc then local acc_name = getAccountName(currentAcc) if acc_name then local query = dbQuery(dbConn,"SELECT * FROM achievements WHERE user=? LIMIT 1",acc_name) local rez = dbPoll(query,-1) local data = fromJSON(rez[1]["achievements"]) if #rez == 0 then dbExec(dbConn,"INSERT INTO achievements (user) VALUES (?)",acc_name) elseif #data > 0 then users[source] = data end end end end addEventHandler("onPlayerLogin", root,onLogin) --- a coomand to give me some achievements addCommandHandler("newacv",function(player,CommandName,acv) if player then if acv ~= nil then if users[player] == nil then users[player] = {} table.insert(users[player],tonumber(acv),achievements[tonumber(acv)]) end if users[player][tonumber(acv)] == achievements[tonumber(acv)] then outputChatBox("[Achievements] You have this achievement!",player,100,250,100) else table.insert(users[player],tonumber(acv),achievements[tonumber(acv)]) outputChatBox("[Achievements] New achievement unlocked!",player,100,250,100) end end end end,false,false) addCommandHandler("saveacv",function(player,CommandName) if player then if users[player] ~= nil then local acc_name = getAccountName(getPlayerAccount(player)) dbExec(dbConn,"UPDATE achievements SET achievements=? WHERE user=?",toJSON(users[player]),acc_name) end end end,false,false)2 points
-
Winter Hello, as winter is approaching, I thought I would share one of my scripts. This script replaces the textures of summer in San Andreas with snow textures. The script is very lightweight because, instead of using .txd files, I used images. In San Andreas, there are many duplicated textures that are equal, but with different file names. To address this, I hashed every image in the game and deleted the duplicates. As a result, the images only occupy 142MB instead of gigabytes. Download: https://github.com/paksisoma/mta-winter2 points
-
2 points
-
Opa, e aí @Clebson — como é que vai? Essa função foi removida do painel admin por motivos de segurança. Agora você deve usar o resource runcode para executar comandos e/ou códigos. Ele é bem simples. Primeiramente, você deve iniciar o resource, com o comando /start runcode. Uma vez iniciado, você tem os seguintes comandos: srun - executa server-side. crun - executa client-side. Exemplos de uso: srun createVehicle(411, getElementPosition(getPlayerFromName("seu_nickname"))) | O comando, assim que executado, irá criar um veículo no lado server, ou seja, para todos. crun setSkyGradient(255, 255, 255, 0, 255, 0) | O comando, assim que executado, irá mudar a cor do céu somente para você, ou seja, client-side, quem executou o comando. ATENÇÃO! Esse resource, por motivos de segurança, deve permanecer DESLIGADO em um servidor on-line, público.2 points
-
Hello, I am selling my chatbox resource from a project I was working on Preview: Description: Supports client/server side commands Outputs default messages (player muted, player banned, etc..) Press T to talk with all players Press Y to talk with your team Smooth fade in when a message is typed Supports admin tags Contact & Info: Price: 15-20 euro, only paypal Contact: Gabriel45#6859 (Dirscord)2 points
-
1 point
-
Hey! For example, I have an user table. I have an achievement list store in the scripts. How can I store the completed achievements for the users in the SQL? Maybe a third connection table? Because it is a many-to-many connection Or in the user table somehow?1 point
-
1 point
-
Hi, I wrote a simple form using boostrap, but when I render it to the player, the transparency option does not work. The page I show to the player is transparent until I add bootstrap to it. I've tried with version 4.0, 5.0, 5.2 but still the same problem. My HTML file: head: <link rel="stylesheet" href="bootstrap/css/bootstrap.css"> body: <body> <div class="container d-flex justify-content-center align-items-center"> <form class="d-flex flex-column"> <div class="form-group mb-2"> <label for="username-input">Username</label> <input type="text" class="form-control" placeholder="Ur username"> </div> <div class="form-group mb-2"> <label for="password-input">Password</label> <input type="text" class="form-control" placeholder="Ur password"> </div> <button type="submit" class="btn btn-success align-self-center">Log in</button> </form> </div> </body> lua clientside: local screen_w, screen_h = guiGetScreenSize() local browser = guiCreateBrowser(0, 0, screen_w, screen_h, true, true) local theBrowser = guiGetBrowser (browser) function setURL() loadBrowserURL(source, "http://mta/local/selection-ui/index.html") showCursor(true) end addEventHandler ("onClientBrowserCreated", theBrowser, setURL) any solutions how to make it transparent with bootstrap?1 point
-
As roaddog mentioned, toJSON is the easiest way to dynamic store data. But keep an eye on the limitations of JSON. Only store JavaScript structured default {} objects or [] arrays, nothing in between! (else it will be converted to the default {} object variant) This would be the most space saving solution. Depending on the amount of players you receive every day, it might be a better solution when there are a lot. Just keep in mind that it will be more work.1 point
-
1 point
-
Hey guys! My question is where should I store static data? For exaple list of achievements, or list of weapon config (damage, model etc). In a local XML file, or an uniqe sql table? Thank you!1 point
-
1 point
-
Well, i want to achieve that with my inventory system (another script) opening a box gives you a skin and add it to the gridlist. I want to know how can I add a skin to that gridlist from another script so i can try to use it with my inventory.1 point
-
Works like a charm, thank you, problem solved! But I think it should be ultimately divided by line thickness instead of multiplied - at least that's how I got these calculations right. If anyone wondering: dxDrawMaterialSectionLine3D(x, y, z, x, y, liftZ + liftHeight, 0, 0, 16, ((64 * ((z - liftZ) + liftHeight)) / (64 / 16)) / 0.1, misc.chainTexture, 0.1)1 point
-
To achieve the desired result, you need to calculate the chain length, for example, with getDistanceBetweenPoints3D. In the dxDrawMaterialSectionLine3D function, the U Section Size needs to be the same as the texture width (16), and the V Section Size needs to be the texture height (64). However, this alone does not yield the desired results. You also need to multiply the V Section Size with the calculated chain length, divide by the texture aspect ratio (in your case, 64/16) and finally, multiply by the line thickness ("width"). I recommend to create a helper drawing function for this, with arguments: start position, end position, chain thickness.1 point
-
1 point
-
Hello, I offer advanced Discord/MTA/frontend/backend services. I offer: Advanced resources. Advanced gamemodes. Graphic design for resources and customization for your server. Debugging and fixing errors in resources. Creating databases for your resouces. Setting up forums on IPS/MyBB and a player panel. Selling old resources and ready-made. Website development (frontend - Vue, backend - Express). Developing Discord-MTA bots (whatever you need). Creating various APIs (Express), for example, avatars retrieved by Discord user IDs and a YouTube search engine for stereo. The price depends on the service, and I approach each task individually. You can contact me on Discord: iq65_ I DO NOT RESPOND ON FORUM Portfolio: https://streamable.com/5dxy4v https://streamable.com/rr2twy https://streamable.com/sezcb2 https://streamable.com/upqgrl https://streamable.com/1fevxc https://streamable.com/iecug7 https://streamable.com/mixxoj https://streamable.com/fh5r8w https://streamable.com/bw8ezr https://streamable.com/iy1ee3 https://streamable.com/y1c6ch https://streamable.com/fxaicz https://streamable.com/yizhxc https://streamable.com/6592k7 https://streamable.com/98n9jn https://streamable.com/xhcvbg https://streamable.com/rahvmm https://streamable.com/hysv19 https://streamable.com/26i9ni https://streamable.com/o3xgz0 https://streamable.com/xdqh0h https://streamable.com/4nvs49 https://streamable.com/nwrrj9 https://streamable.com/wrfwyu1 point
-
Hey there! Does anybody converted GTA:SA Singleplayer Racing Maps, found in Racing Tournament events across the SA? I know few of them are on the MTA community website including Little Loop, Go-Go Karting etc, but anybody converted actual full pack? If not, how can I find them in main.scm files? I scattered through and can't find them so atleast I would know the coordinates how to put checkpoints and recreate them.1 point
-
For every aspect of things a cheat/lua injector can result in, there is specifically tailored ways to prevent it. Scripters with a good sense of security-by-design can do so much more than follow basic "Script security" guidelines that apply mostly to triggers and such. In case of player money, there should be a solid foundation (before anything else) that consists of not using GTA money as the truth/unit, but handle anything to do with money by yourself using your account system that operates through SQL database. At any time a player does anything that can lead to money increasing, being given or deposited, it has to happen through a trigger handling the event (context in which the player experiences a money change). Secure your triggers (also read https://wiki.mtasa.com/wiki/Script_security) and you're done. It's important to understand that as part of it, you are redefining money: i repeat, do not use GTA money. Use a field in your SQL database that defines the unit money, and it's an entire different virtual entity than GTA money. Obviously, also avoid using elementdata to store or update player money. Of course, even when you incorporate my suggestions on how to handle money different in an integral way, extra checking like explained by @IIYAMA is a good stick behind the door, in case someone manages to find and exploit a script security flaw in your triggers. @FlorinSzasz1 point
-
1 point
-
If you are worrying about performance, in that case you might consider using MySQL triggers. Those are as close as it gets to your db, making sure you do not cause overhead and align the value-checks with the update moments. https://dev.mysql.com/doc/refman/8.0/en/trigger-syntax.html Create a value-check table / rollback table: Stores the value that it is being incremented (within 30 seconds) Stores the future time, when elapse the incrementing value can be ignored and resets to 0 Create a trigger which triggers on update Do behaviour of value-check table. If the value jumps too much UP: Report to a separate table Freeze account Rollback manually / automatic (not recommended)1 point
-
You're getting kicked due to the anticheat detecting some sort of unwanted program you're running (un)intentionally (a trainer). If you have no clue about running trainers or any program at all that could interfere with MTA, then consider performing a full antivirus scan of your device in order to try and detect that unwanted program and remove it. If this is not possible, you should also consider performing a clean reinstall of your OS. It's up to you to figure out which program you've installed/are running intervenes with the anticheat. Should you need additional assistance on this matter, please consider reaching out to that fork's (GTA Ukraine) support team to help you out with this as we do not provide support for fork-related projects.1 point
-
Hey guys - It has been a long time since we last posted or updated this thread. We are aware that the first page is filled with outdated information at this point, but we are happy to announce some new spicy information. The AGRP Staff team present to you guys, something new to the MTA-ROLEPLAY community; Source: Posted by - SonnyB Lead Administrator on ArdicGaming's offical discord, — 11/14/2023;1 point
-
I encountered this error because I was using the old version of the DGS script. solved1 point
-
Nice guide! You can upload images to your application on the Discord Developers Platform; these are called "assets" and have a name. You can use these asset names in the first argument of setDiscordRichPresenceAsset. For example: -- will display my server's logo asset image -- with the server name text when mouse hovered over the image setDiscordRichPresenceAsset("my_logo", "Server Name")1 point
-
Olá Doongogar, infelizmente acredito que não terá a solução pra isso aqui no fórum. Essa batalha contra cheater / spoofers acontece sim e há uma ideia rolando contra Spoofers. Hoje há poucos servidores com o projeto rodando. Caso encontre sua solução para criar um anti-spoofer, peço que por gentileza não à exponha aqui no fórum. Por motivos meio óbvios nenhum criador de Cheater expõe a vulnerabilidade do MTA para continuar abusando e a vulnerabilidade nunca é arrumada, logo nós desenvolvedores não devemos expor nossos métodos para contra-atacar. Evite o máximo expor suas ideias, teste-as e ofereça a solução para os servers em você ver que há mais problemas em relação a cheaters. Os donos de tais servidores podem fazer o trabalho de expor suas ideias para quem estiver desenvolvendo o anti-spoofer. Enfim, apresente sua ideia e sua solução, caso a encontre, para as pessoas certas.1 point
-
1 point
-
1 point
-
Fora do painel P ou sem mexer no acl.xml você não tem como. A não ser que você desenvolva um resource só para fazer isso via comando. (mas obviamente este resource precisará de permissão admin para poder fazer isso) Outra coisa mais inteligente a se fazer é configurar seu resource para solicitar sozinho as permissões que ele precisa. Por exemplo, se o seu resource precisa de permissão admin só para usar a função de KickPlayer, basta você fazer este resource solicitar essa permissão específica em vez de dar acesso total de admin para ele. Para fazer um resource solicitar permissões específicas, basta adicionar isto no meta.xml dele: <aclrequest> <right name="function.kickPlayer" access="true" /> </aclrequest> Depois de iniciar o resource, deve aparecer a solicitação no Debug Console (use /debugscript 3 para mostrá-lo). Para aceitar a solicitação, só precisa que um Staff autorize com /aclrequest allow NomeDoResource all A solicitação também pode ser aceita no Server Console, usando o mesmo comando porém sem a barra.1 point
-
Hello everyone! We have prepared a special gift for you to celebrate Multi Theft Auto's 20th Anniversary! Here is an exclusive interview with IJs (also known as IJsVogel), the founder and first developer of the Multi Theft Auto project. Read on to see his thoughts on the project in retrospective. Note: more details about Multi Theft Auto's history and timeline can be found on our Wiki article. What had prompted you to create the very first multiplayer mod for GTA3 - a game that did not offer such a feature out of the box? Wow, it has already been 20 years.. I remember the reasoning behind it very vividly! As I grew up in the 90s I was lucky enough to be surrounded by PCs, early internet and PC games from the very beginning (of myself). I was a very fanatical player of Grand Theft Auto 1 and 2, especially so because these games had a multiplayer mode that I could play at home with my brothers. Then, finally in 2002 when GTA3 came out for PC, I was 13 at the time and completely astounded at the possibilities of this 3D open world version of my favourite game for the first couple of months. After a while, it sinked in that this game was missing any ability at all to play with others, which put a huge dent into my appreciation for the game... At the time, I never really played the storylines of games because it didn't quite fit my youthly attention span (my older brother always left the savegames for me to play) and was usually more into the multiplayer and modding aspects anyway. Two completely coincidental things then sparked the start of an attempt at multiplayer. First, a fake French screenshot was being sent around forums, showing a multiplayer mod for GTA3. This raised my hopes tremendously and I was looking forward to testing this so much. When it turned out to be another hoax, my hopes were in shambles and I began thinking about hacking something together to do it anyway. A screenshot of a fake multiplayer mod in GTA3. Surfaced in July, 2002. Secondly, some coders had just released a trainer/cheat tool for GTA3 including its source code in Visual Basic 5 or 6, which was the only language I knew at that time as I was only 14 by then. I started hacking around with the tool to make a synchronized trainer tool, and figured I might as well synchronize car positions, and a very crude attempt at multiplayer was born and it was dubbed GTA3: Alternative Multiplayer (GTA3AM). It was amazing to see it work, it seemed such a stupidly simple hack! This was the first effective prototype of Multi Theft Auto. A not-so-fake GTA3AM 0.1 Client window, win9x style! February, 2003. Were there other people who shared your idea and wanted to contribute? Was it easy to find them? The initial GTA3AM was posted on a well-known Dutch tech forum, and this raised some attention from people over there. It wasn't so much a conscious decision to find people, people really wanted to contribute and we gathered on IRC, with some people helping out with the website, server donations and coding. This grew organically as the users grew. The first months or so was mostly Dutch techies helping out, including a well-known provider sponsoring our hosting, and after the first year or so the team became very diverse, international and well skilled. I am still very grateful for each and every contributor to this project from the very start and later, also because I was still very young at the time, and the project would not have been able to thrive on my contributions alone. I have had the fortune to meet and work together with some of the most skilled people I've met in my entire life, as well as people who simply loved playing around with our creations. Work on ambitious projects like this typically involves solving tough and unusual problems. What was the most significant one that you and the team had to deal with during your time in MTA? And perhaps, maybe there was a really peculiar problem that you also would like to share? MTA has been an amazing learning curve for me, and I believe many other contributors in its 20 year lifetime, to acquire a very special mix of skills. We have had tremendous fun and also frustration engineering the hell out of all sorts of things, and trying to tie worlds together over a network. There are countless things that were tackled and pioneered (even if only personally) in this project, so it is hard to pinpoint out a single thing. I think one of the most groundbreaking efforts of this project however was to restructure the entire project and release it as open-source to the world. As part of that we spent much effort to restructure everything using git (this upset quite a few developers at the time) and published it in 2009 or so on GitHub when it was still in its infant stage (GitHub even mentioned us on their blog at the time). A bit messy in MTA:SA Racemod internal tests. Some time in the second half of 2005. If you had a chance to start this project again, would it be closed-source as it initially was, or would you prefer it to be open-source like it is now? It would certainly be open-sourced again, probably as early as possible. The facilities for open source projects are much, much better now than 20 years ago as well. The move to GTA:SA kind of left the multiplayer mods for GTA3 and GTA:VC in the dark. While there were some alternative mods developed for these games, they did not really leave a lasting impact in the long run. Have you or the rest of the team ever considered bringing back the support for GTA3 or VC after MTA:SA DM 1.0 was released? I do not think there was ever a strong will to revive the GTA3 or GTA:VC versions, because GTA:SA by all means had a better and more capable engine. Perhaps in today's open source world, where contributors are easy to find, it could have had a better chance. My personal opinion (or fantasy) at the time was to "just" build our own game behind it instead, but that obviously never took off. Development build of MTA:VC Blue. Some time in the second half of 2004. What in your opinion are the strongest points of Multi Theft Auto (be it the original 0.x series or MTA:SA)? What do you think the project especially succeeded in? The critical mass of players and contributors, that never seems to die out, and it keeps surprising me. The incredibly challenging technical issues we have had to solve (and still do), sometimes from the ground up. This makes for a very exciting sandbox to work in as a developer or hacker. And in contrast, do you feel there are any shortcomings in MTA? I think one of the missed opportunities in MTA is that we could have developed a bigger framework or other products on top of all the codebase we had written. A bit messy again, this time during MTA:SA DM internal tests. December, 2007. Thinking back, are there any things in the project that you think you would have done differently nowadays? I would have loved to have set up a much more professional collaboration with the entire team that were around at the time the project was open sourced around 2010, using all the knowledge we had all acquired in the process of making MTA:SA 1.0 when it was still very hot. With the knowledge on startups that I have now, I realize that had I been 5 or 10 years older, I might have had some better idea on how to take it to a level to possibly develop our own game(s) or framework on top of it. But alas, for MTA's sake it turned out good either way! The MTA Community is very large these days and scattered across all continents, but that was not always the case. What was the community like back in your time? As with most (modding) projects you usually start out with a very niche audience. For MTA, this was a direct result of me posting on a Dutch tech forum and as a result, the initial contributors in the first months were mostly (if not all) Dutch and Belgian. With the GTA series obviously being a hit in the Western world, more people wanted to contribute (and play). Nearly all of them came from the US, UK, Central and West Europe and the Nordic countries, with a few notable exceptions. I think this pretty much mirrored the demographics of the GTA series themselves. Let's race! Beta tests of MTA:SA DM. December, 2007. I have noticed that you have been involved with various tech projects after retiring from MTA. What are you up to currently? Was your experience from working on MTA useful in these projects? Among some other startup adventures in the past years, I currently lead an audio software company called KoalaDSP that develops virtual audio plugins, instruments, effects and algorithms for a bunch of very big companies out there. We started this company around two years ago in Amsterdam after some previous endeavours, and with around 10+ people working on some crazy software being used in music and home studios around the world. But Multi Theft Auto has given me a lifetime passion for video game development, and after many years or scribbles and notes, I have finally found the time and people around me to developing my second (..after MTA) game idea using 90s retro graphics and voxels. I feel quite strongly that my experience with Multi Theft Auto has been a unique and once-in-a-lifetime gift of skill, much adventure and lasting connections with others. I can't quite pinpoint it, but it feels special. I hope that also still holds to this day for any contributors out there. A long-running project like MTA also means a lot of memories. Do you have any fond or interesting memories from your time working on the project that you would wish to share? I have so many memories of my time during MTA, it is hard to pick out something! Apart from the early memories of all the excitement, healthy stress and testing with all these people during the very, very early days, there is something I remember from a bit later: There was a pretty far-fetched and secret clandestine plan from some of our developers to put a live editor into one of the first MTA:SA releases. Like often with our features, it was really a coding challenge, a show of skill. Are you skilled enough to build this crazy thing? They figured that, in order for the community to enjoy using our mod, they needed an engaging way to create content. So they started building a complete editor inside the game. It required a tremendous amount of work, but they kept to it, others started contributing, and it ended up as one of the key features of the entire release! Some say that editor served as an inspiration to other mods, possibly other games afterwards. Internal tests of the cancelled MTA: Orange. April, 2010. To wrap things up, is there anything that you would like to say to current MTA Team members and/or to MTA fans? Thanks for putting your enthusiasm (and many wasted hours of gaming!!) into this amazing project. Props to all the contributors, past, present and future. MTA, the way it's meant to be played! Interviewed by jhxp.1 point
-
Olá! O tamanho limite de um arquivo .dff no MTA depende da capacidade de processamento do seu computador e dos recursos do servidor em que o jogo está sendo executado. Quanto maior o arquivo, maior será a demanda do processamento, podendo causar problemas de desempenho ou até mesmo crash do jogo. É recomendável manter os arquivos .dff dentro do tamanho padrão para as skins do jogo. Já em relação às texturas, o tamanho ideal depende da finalidade da textura e da resolução do dispositivo em que o jogo será executado. Para dispositivos com baixa resolução, é recomendável usar texturas menores para economizar recursos do processamento, enquanto para dispositivos com alta resolução é possível usar texturas maiores. O ideal é testar diferentes resoluções e encontrar a que melhor se adapta ao seu jogo e ao seu público-alvo. Espero ter ajudado! 512x512 pixels - essa é uma resolução relativamente baixa e pode ser usada para texturas de menor importância em um jogo ou para dispositivos com baixa capacidade de processamento. 1024x1024 pixels - essa é uma resolução intermediária e pode ser usada para texturas mais importantes em um jogo ou para dispositivos com processamento médio. 2048x2048 pixels - essa é uma resolução alta e pode ser usada para texturas de maior importância em um jogo, como personagens principais ou objetos importantes, ou para dispositivos com alta capacidade de processamento. É importante lembrar que essas são apenas sugestões e a resolução ideal para as texturas de um jogo pode variar dependendo das necessidades específicas do projeto.1 point
-
I'm excited to show you my latest tool. This time it is something different than my previous tools. It is a bigger project which came to my mind over 2 years ago. I failed at first time because I had trouble with rotations (built in mta function doesn't work well so I had to use quaternions which caused problems as well). Moreover one of devs was working on new editor and he was going to add multi selection option but he cancelled the project. After 2 years I decided to finally write it and also add few additional features. Many hours spent on the tool, thousands lines of code but here is it. I hope you like it and find it useful. Personally I think it should speed up your mapping a lot. Few features might look complicated (actually they are easy to use) so I advice watching or reading tutorial carefully. Features Let's see what this tool is capable of! Create groups of elements using various selection tools and element filters a. edit their position and rotation around all axes b. change their properties - all popular element types are supported c. clone / delete options d. large group support enables you to move / edit whole parts or even maps Duplicate 2 groups Change pivot position Add groups to library a. browser with search and sort options b. loading big groups enables you to join many maps into 1 c. import option which adds all MSTU groups from a given map Cover groups a. create your own cover variations or object compositions b. default cover settings makes covering even faster Customize tool settings on your own needs Download More info and full tutorial you will find here: https://www.thecrewgaming.com/forum/showthread.php?tid=2467&pid=12255#pid12255 Support me If you want to support me leave feedback and also you can buy me a coffee so I won't starving. Thanks a lot! Buy Coffee Feel free to ask questions below or via PM/discord. I'm also opened for script requests. I will keep updating the tool in case you find some bugs. Discord: https://discordapp.com/invite/C4TRxr81 point
-
Hello Guys it's me again, As the tittle says today i'm going to explain to you LUA Strings try to follow me till the end. Let's get started , String is a sequence of characters it can be initialized with three forms which includes: Characters between single 'quotes' : Example 'This is The First Text' Characters between double "quotes" : Example "This is The Second Text" Characters between double [[square brackets]] : Example [[This is The Third Text]] An other example for the above three forms are shown below. Text = {} Text[1] = 'MTA SA' -- Single quotes Text[2] = "The Greatest Game" -- Double quotes Text[3] = [[You Will Ever Play]] -- Double square brackets for i=1,#Text do outputChatBox(Text[i]) end --[[Result : MTA SA The Greatest Game You Will Ever Play]] Escape sequence characters are used in string to change the normal interpretation of character. for more information check the list below: Finding Reversing: Formatting strings: Character and byte: Last function: A character class is used to represent a set of characters. examples shown below. If you have any questions, please feel free to ask.1 point
-
Lua tutorial for absolute beginners This tutorial can also be viewed on GitHub 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.1 point
-
Hey Dear MTA Creators, Serial: 612A0DBA66FBC428D4D402D4CE9F3752 I would like to get unban in MTA i cant join any server anymore because of Reason : DDOS Investigation (Email: [email protected]) also no duration of time but please some mercy if possible today.. Well I will come directly to the main point and will not try to lie around I guess i got banned because of DDOS wich is already more then days ago i did i dont remember but suddently i wanted to play MTA some rounds and noticed today joining Server i got banned well i would like to have an unban its such an Awesome Game making fun i cant live without it i schould had think before doing this but i accept my mistake and with this i promise you MTA Team this will never happen again. I hope you will give me Chance I really dident ddosed for fun i just took some revenge to some who did it to me but this also isnt a right way i know my mistake it wont ever happen again i promise it if it happen again you can ban me forever in MTA but just please give me a chance to get unbanned so fast as possible also my little brother (6 Years ) playing mta and he is mad and crying since morning i did something on purpose with MTA thats why not working. Im ready to do everything just give me a chance and unban i swear and promise with this i wont do anything like this again. I admit it and i know iam guilty but give me a chance. Greetz, Avenkz1 point
-
لازم يكون فيه تحقق ان القاتل ماهو السورس لأن اللاعب لو انتحر بيطلع له انه قتل نفسه بنفسه1 point
-
What's the problem with GTA:SA? Why do you need to have the MTA without GTA installed?1 point
-
Well... In theory it is possible to create a web interface that would control an avatar on the server and that avatar could interact with players in some simple ways (we already have the web chats on MTA community and they've been there since forever). As for seeing what is going on on the server the simplest way would be to display players and vehicles on GTA:SA map in the web browser (there was a time when MTA had this feature by default ), this days it is even possible to force any client on the server to take a screenshot and send that to a web client (though making a high quality stream in real time is rather impossible). That said - it would be nothing like playing MTA normally.1 point
-
Lua predefined variables. MTA predefined variables. List create user Fro, More details on the functios-handlers Element tree If list is broken or change - write down update list and this post will be updated. Original post by MX_Master viewtopic.php?f=141&t=37420 Wiki: https://wiki.multitheftauto.com/wiki/Pre ... ables_list1 point
-
addCommandHandler("neverblow", function(player, cmd) if not isPedInVehicle ( player ) then return end local veh = getPedOccupiedVehicle(player) if not veh then return end setVehicleDamageProof ( veh, true ) end)1 point
-
"Table" is the datastructure of Lua that can be used as an array, list or even class. The ipairs() iterator only works with increasing indices (1,2,3,4, ..). If you want to loop through all numbers, use a numeric for loop: for i = 1,10 do .. end -- loops from 1 to 10 in steps of 1 If you want to loop through all elements of a table in no particular order, use pairs(): for k,v in pairs(table) do .. end Maybe you also want to use table.insert() and table.remove() which shifts the indices to create increasing indices. http://lua-users.org/wiki/ForTutorial http://www.lua.org/manual/5.1/manual.html#5.51 point