Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 28/12/16 in all areas

  1. Thanks for the suggestion. However, I think there are some problems with such an attribute. Implementing this would require the server to send the changed script files on each resource start to luac.multitheftauto.com (compiling it locally isn't possible due to security reasons). Also, since you probably don't want to add and remove the extra_obfuscation attribute when switching between debug and production, you'd end up with extra_obfuscation being always enabled. However, this would restrict the debug capabilities a lot as debug information are stripped as well (so you'd get bad error messages without script name and line). Instead, I'd suggest you to use a build script that compiles all your files before switching over to production mode (Python is a good language for such things).
    2 points
  2. Hi there. Oh, what is that? The holidays are here again? Yep, it looks like they are, so that means the usual stuff. We are going to give you guys & gals a heads up on what has been happening in MTA's world this whole year. And if you are one of those well informed types who does not need a recap, you still might want to give this post a read, as there will be more than that later on! 2016 in Recap Near the end of January, we released a bugfix release for MTA:SA 1.5.x - Multi Theft Auto: San Andreas 1.5.2. Among a few other things, that version had and improved the server app compatibility for Linux server hosters and fixed some desync issues. In July, we started offering a new way of promotion for server owners who wanted to gain more players quickly. Namely, one of the top positions in the ingame server browser for a week in an exchange for a small fee. We felt it was a good way to not only ensure that our Project's financial needs are balanced, but also to allow some smaller but ambitious servers to try and get the player base they were always seeking for. In August and September, we made significant changes to our forums, including a switch to a new forum software. There were a bunch of issues found afterwards (such as keeping the users login states), but we managed to fix most of them. Following that, we were featured in an article on the Rock Paper Shotgun, which was pondering the popularity of multiplayer mods for GTASA, even long after its original release. You can find the full article on the RPS website. And finally, on 20th of October, Multi Theft Auto: San Andreas 1.5.3 was released. This was a large release that could as well have been labelled as a next major release, but was not as it was still compatible with the 1.5 series. A bunch of interesting MTA:SA-related YouTube videos from this year Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Highest recorded number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Recent number of daily unique players 124981 players 2016.12.23 (Friday) Highest recorded number of daily unique players 142785 players 2016.09.04 (Sunday) Recent number of monthly unique players 554757 players November, 2016 Highest recorded number of monthly unique players 626167 players August, 2016 Yes, to our surprise, there was a new concurrent unique player count record set literally on the day we were gathering these stats for you. MTA:SA Version or series Percentage of players using that version or series as of 23rd of December, 2016 1.5.3 95.20% 1.5.2 1.5.1 1.5 3.60% 0.09% 0.09% 1.4.x 0.67% 1.3.x 0.28% 1.0.x + 1.1.x + 1.2.x 0.07% It looks like more people decided to use newer versions of the mod than the last year. *** As for the future, we have been working on the next release, which will contain mostly bugfixes and compatibility tweaks. However, we did some work on new features as well, such as Custom Train Tracks, which we hope to be finished soon. We also want to look into improving streaming, raising the limits and making it possible to add new IDs for things, but this will be tricky. Nonetheless, it would be great to see those features working in MTA:SA one day as, for example, they would allow server owners to use bigger and better custom maps with new vehicles working correctly for all players. That's it for now. Happy Holidays and Best Wishes for 2017 from the MTA Team!
    1 point
  3. So I'm finally releasing the MTA Highlight extension that powers our syntax highlighting on the forums and on the wiki. This enables the blue and orange links you see that link to the Wiki for MTA functions. The highlighter is built off of Google's prettify library, so is only compatible with software that uses Google Prettify to highlight their code. Installation Usage is really simple, and it sits very well with Google's own prettify library. Note, that you'll need a version of JQuery for the functions to work. In your HTML HEAD includes, add the following: <!-- Add JQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <!-- Add Google Prettify library --> <script src="//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <!-- Lua not added by default, add it--> <script src="//cdn.rawgit.com/google/code-prettify/master/src/lang-lua.js"></script> <!-- Get the latest function definitions from MTA Forums --> <script type='text/javascript' src='//forum.multitheftauto.com/uploads/javascript_syntax/luafuncs.js'></script> <script type='text/javascript' src='//forum.multitheftauto.com/uploads/javascript_syntax/mtafuncs.js'></script> <!-- Add MTA-prettify library --> <link rel="stylesheet" type="text/css" href="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.css"> <script type='text/javascript' src="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.js"></script> You'll then need some JavaScript to use Google's Prettify and apply MTA's markup: $(function () { // Perform Google Prettify PR.prettyPrint(); // Add MTA markup applyMTAMarkup(); }); Usage Usage is just like Google's own Prettify, but you'll need to add lang-lua as a class to your <pre/> snippets. For example: <pre class="prettyprint lang-lua"> function onWasted() if not( isGuestAccount (getPlayerAccount(source)) ) then local jailtime = getAccountData(getPlayerAccount(source), "Jailtime" ) or 0 local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) if tonumber(jailtime) == nil or 0 then outputChatBox ("1", root) fadeCamera (source, false) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) elseif tonumber(jailtime) > 0 then outputChatBox ("2", root) fadeCamera (source, false) setTimer (portjail, 1500, 1) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) </pre> Example An example JSFiddle is available here: https://jsfiddle.net/darkdreamingdan/0uvzbL1n/. Source code available here: https://github.com/darkdreamingdan/MTA-prettify . I'd really appreciate a GitHub star if you found this useful! Note: Usage may be different if installing on different CMS software. Typically, this is easily implemented by using your CMS/forum's Theme editor.
    1 point
  4. I will And btw I just noticed something that can be issue too. I forgot to change different column numbers so it's just replacing same text every time guiGridListSetItemText(vlist, row, 1, table[i][1], false, false) guiGridListSetItemText(vlist, row, 1, table[i][4], false, false) guiGridListSetItemText(vlist, row, 1, table[i][3], false, false) They're all 1 instead of 2 and 3
    1 point
  5. Ok try the code which wrote by @Snow-Man and good luck .
    1 point
  6. Try reinstalling your video card driver; also try reinstalling MTA itself.
    1 point
  7. sorry for being late but now mta works fine once i close the page mta opens and everything is fine And sorry for wasting your time, Thanks
    1 point
  8. Update: So, today was the day. I've managed to add some functions to extend Vector3 class. After successfull build I've started the server and joined, checked that everything works and quit. Then I took a look into server log and something scared me: some guy named "NeedyNurse32" somehow joined my server: I was like "wtf? how did he managed to join custom server?!!". I immediately shut down the server and set up password in "mtaserver.conf". It took me a while to realize that the guy was actually me. I simply forgot that MTA assigns random nickname when you launch it first time . So, moving on, I've tested functions performance, and results were quite humiliating: As you can see Lua is executing same functions about 3-4 times faster than c++. At this point I thought that there's no sense to continue, as the whole purpose of making funcs in c++ was to increase performance. It looked like the cost of transition between c++ and lua was way too high, and running math library in native Lua code turned out to be faster than offloading it to c++. But... I didn't take into count how much MTA debug version was slower from release version. It took me a while to build release version (it's not mentioned on wiki, but apart from 2010 DirectX SDK you also need 2009 DirectX SDK to build in that config with no errors). And release mode it's a totally different story : It's still far from perfect, transition cost still looks like a problem for c++, but moving on into more complex structures the difference should grow exponentially .
    1 point
  9. مود جميل ورائع تسلم علي الطرح بالتوفيق لك ~~~ ولكنك حاطط رابط حذف الرابط حق المود ^^
    1 point
  10. No. You'll need to make your own script to handle multiple server configurations and instances.
    1 point
  11. function makePlayerZombie() if getTeamName(getPlayerTeam(source))== "Infected" then outputChatBox("You spawned as a zombie, so you do not have to be afraid for other zombies anymore!", player, 255, 0, 0) setElementData (source,'zombie',true) else return false end end addEventHandler('onPlayerSpawn', getRootElement(), makePlayerZombie) function removePlayerZombie() if getElementData (source,'zombie',true) then setElementData (source,'zombie',false) end end addEventHandler('onPlayerWasted', getRootElement(), removePlayerZombie)
    1 point
  12. مشكور, يعطيك العافية تمت الافادة
    1 point
  13. اذا تقصد طريقة الحفظ فهي عن طريق SQL لازم تضيف ارقمنت جديد للجدول وتحط فيه لون الرسالة ^ لما يغيره من مود التغيير ... يسوي داتا لحسابه + يتحقق لو معه تاجات خاصة كمان يحدث قيمة اللون .
    1 point
  14. Good job @Jusonex! @AfterAll14 just a quick note - don't forget to re-run premake (create-projects.bat) after you pull this fix from git, because faulty command is saved in projects, so they must be fully regenerated.
    1 point
  15. Never use special characters or spaces in file / directory names during development, it will save you a lot of time in the future. I bet it is your "MTA SA" folder that is causing the problem
    1 point
  16. نتمنى التسجيل والمشاركة من الجميع وهل تؤيدون افتتاح سيرفر هجولة جديد؟
    1 point
  17. Thanks a lot for sharing this useful library i'm going to try to make a editor in my community forum. And yeah you got my star .
    1 point
  18. According to http://php.net/manual/en/function.shell-exec.php shell_exec returns some information in a string so change these 2 lines: shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/mta-server.sh"); echo 'Server started'; Into this: $result = shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/mta-server.sh"); echo 'Result of shell_exec: ' . $result; And maybe it will give you an error message.
    1 point
  19. Bumping a 2 hour topic, seriously..? killmessages is bugged and I will be fixing it.
    1 point
  20. So since you created this topic (June) you still have no idea how to reset a counter? That means you are just lazy to do anything. Also a tip, when you forget your password on a forum account, try to use "Forgot my password" link to recover it, don't need to create different accounts every time you need help.
    1 point
  21. showframegraph подскажет кто, полосы разного цвета за что конкретно отвечают?
    1 point
  22. Для получения информации от сервера используется UDP ASE порт, по стандарту он игровой+123, то есть если игровой 22003, то ASE порт 22126. Спецификацию ASE порта можно найти тут: https://github.com/multitheftauto/mtasa-blue/blob/master/Server/mods/deathmatch/logic/ASE.cpp#L246-L341
    1 point
  23. Скину наработки из MTA RP, думаю под Lua переписать не составит труда Angle - чтобы узнать угол между двумя векторами Rotate - чтобы повернуть вектор на указанный угол (возвращает новый вектор) public float Angle( Vector3 to ) { return ( 360.0f - ( (float)Math.Atan2( to.X - this.X, to.Y - this.Y ) * 180.0f / (float)Math.PI ) ) % 360.0f; } public Vector3 Rotate( float angle ) { angle = (float)Math.PI * angle / 180.0f; return new Vector3( this.X * (float)Math.Cos( angle ) - this.Y * (float)Math.Sin( angle ), this.X * (float)Math.Sin( angle ) + this.Y * (float)Math.Cos( angle ), this.Z ); }
    1 point
×
×
  • Create New...