MTA Contributors
  • Content count

  • Joined

  • Last visited

Community Reputation

16 Decent

About Arran

  • Rank
    MTA Contributor


  • Gang
  • Location
  1. List of predefined variables.

    You're missing 'arg'. 'arg' is a predefined Lua variable in functions which use '...' as an argument. Example: crun function a(...) outputChatBox(tostring(arg.n)) end a(10, 20, 30) -- "3" (arg.n returns 3 because there were 3 arguments in ...) crun function a(...) outputChatBox(tostring(arg[2])) end a(10, 20, 30) -- "20" (arg[2] returns 20 because the second argument in ... is 20.)
  2. Awesome. It just needs a main page for these different files. Then someone with access to edit MTA wiki home page can add a link to it.
  3. Is it just existing MTA internal functions that you want documenting? I thought that visual studio already has features which show you function lists and their parameters. The main thing that stopped me being able to contribute more was when it comes to doing something new, I wouldn't have the slightest clue where to start so for me the most useful documentation would be explaining how to do new things which I guess involves memory hacks. Like you said, this is something that is done over the long term so there's no reason why you can't get the ball rolling by getting a list of all functions and there parameters and starting some wiki pages with this basic information and then include stuff like "Please can a developer who understands this explain this" and then eventually some information might get added to it.
  4. MTA is open source... What is stopping YOU from documenting this stuff? Here's some documentation: And guess who wrote that page? I did. Am I an MTA developer? No. I have managed to make documentation and contribute actual working source patches yet the C++ knowledge that I have could be learned within 1 day so what is your excuse for not looking at the source code and documenting it? Because you didn't make that source code? And you really think whoever wrote that is even around now to document it or anyone can even remember what exactly was written by who when some of this source is 10 years old?
  5. As I post this there are 17 open pull requests. MTA developers shouldn't waste time documenting stuff when there's open pull requests made by people who didn't need any documentation that need adding. Even I managed to make a pull request and have made some other contributions in the past and I did that with existing documentation and with only very basic C++ knowledge, a lot can be done by just looking at, copying, modifying existing code. I Just realised my pull request has been ignored for 5 months even though developers already gave me tips to improve it and I did all the improvements, the code is flawless but un-added it's really demotivating, I'd probably have contributed more if my source patches had have been added sooner and perhaps other potential contributors are getting put off too because why would you spend time making a second patch when your first one might never even get added?
  6. Extra obfuscation to meta.xml

    I use and get script name and lines when a client has a debug message. I guess it depends what settings you have set here: I don't think there's any need for this suggestion because if you use a batch file all you have to do is drag and drop the .lua into the .bat and within seconds your .luac is updated.
  7. CPU for MTA:SA/GTA:SA.

    If you specifically want a new CPU for playing MTA look for the one that has a high single threaded performance because GTA SA only uses 1 core of a CPU: However any of the above you linked to should be more than sufficient considering a lot of people that play MTA have much much older CPU's than that.
  8. Thanks. If there's any other tasks like this, let me know.
  9. Turns out that MTA has a lot of redundant if statements like: if ( pPed ) { // Blah } else m_pScriptDebugging->LogBadPointer ( luaVM, "ped", 1 ); These checks have been unnecessary since the introduction of argStream and I'm guessing they're only still in the code because it's so time consuming to remove them all. I volunteer to go through all the files and delete any of these unnecessary checks but before I do that I want a developer with access to confirm that if I do this, they will merge my pull request(s). I have done 1 file reducing the file by 286 lines: I'm guessing removing them will have virtually no performance impact but removing so many redundant lines definitely improves code readability and I am happy to spend many hours finding and removing all of these statements I just need a confirmation from a developer.
  10. Little help with admin level

    Don't you get a debug warning from setElementData? You're missing argument 3 which is setting what argument 2 should be. It needs to be setElementData(source, "admin.level", adminLevelHere) however your "setalevel" command doesn't save their admin level any where. Add this to "setalevel": setAccountData(getAccountPlayer(targetPlayer), "admin.level", tonumber(szint)) Then when they login get it and set it like this: setElementData(source, "admin.level", tonumber(getAccountData(getPlayerAccount(source), "admin.level"))))
  11. Wanna contribute, need some help This page has info on how to get it all working, however the MTA wiki has been down for hours. I followed those instructions 2 days ago and everything worked.
  12. Rocket kill

    onPlayerDamage doesn't have those parameters that's why I told you, you can't do it server side.
  13. Rocket kill

    That is a good idea. We would need to store the last damager and the weapon used when vehicles are attacked, however onVehicleDamage doesn't give us these parameters meaning we'd need to use onClientVehicleDamage and by that point the whole thing would be too impractical for me to commit to the official killmessages resource. However you could do this for yourself. I'd recommend handling onClientPlayerWasted, basically move that function to client side and then onClientVehicleDamage would be more practical, in fact I don't even know why official killmessages has that code server side because the whole thing can be done client side. I actually moved that main function client side for my server.
  14. start server via php

    According to shell_exec returns some information in a string so change these 2 lines: shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/"); echo 'Server started'; Into this: $result = shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/"); echo 'Result of shell_exec: ' . $result; And maybe it will give you an error message.
  15. open window on marker hit

    There is no such onPlayerMarkerHit function, it's onClientMarkerHit when client side. Also if those files are in the same resource you don't need the "exports.heist001" bit. Also you need to add a check in openMission to make sure that the player that is entering the marker is the local player, otherwise this GUI would open for all players whenever anyone enters it.