Neproify Posted August 14, 2014 Share Posted August 14, 2014 Hello! Today I show you how to compile LUA files in Sublime Text 3. It's really simple. This tutorial is for Windows system. First, you must download the luac file from: https://nightly.multitheftauto.com/files/luac_mta.exe Now copy that to the mods/deathmatch directory in your mta server. Next go to C:\Users\username\AppData\Roaming\Sublime Text 3\Packages\User and create file named: mta.sublime-build When you do it, open file and paste text like that: { "cmd": ["DEL $file_base_name.luac"], "cmd": ["C:\\Program Files (x86)\\MTA San Andreas 1.4\\server\\mods\\deathmatch\\luac_mta.exe", "-o", "$file_base_name.luac", "$file_base_name.lua"], "working_dir": "${file_path}", } Just change the directory to luac_mta.exe file if it isn't default. Now, back to the Sublime Text 3, go to Tools->Build Systems and click on mta. Now when you build file, compiled file will be delete, next it will be compiled. If you wanna to change the hotkey for build system just do it: Open the .sublime-keymap based on your OS. Enter the following: [ { "keys": ["f5"], "command": "build" } ] You can change f5 to any key. And now... You can compiling LUA files in Sublime Text 3! 1 Link to comment
RottenFlesh Posted August 15, 2014 Share Posted August 15, 2014 Wow this is awesome! Having to upload and download a compiled file from the webpage is really annoying. So thanks! This is very useful! Just a question: With this method the files are extra-obfuscated? Or just normal compiled? BTW: I get this warning in the console of Sublime: WARN Without -s or -e, compiled files contains debug information and can be more easily decompiled (script.lua) Link to comment
rain_gloom Posted September 2, 2014 Share Posted September 2, 2014 Change 4th line to something like this: "cmd": ["D:/Games/Dev/MTA/luac_mta.exe", "-s", "-b", "-e", "-o", "$file_base_name.luac", "$file_base_name.lua"], Btw, the original version has a typo. The "," on line 5 should not be there, as that is the last element. Great tut anyways Link to comment
Recommended Posts