Jump to content

NanoBob's MTA map converter


Dufabo

Recommended Posts

(All credits goes to @NanoBob I am just moving his post from archive)
Hello,


As most of you know if you want to use a mapping on a server, most servers prefer to have it in .lua format, converting a .map file to a .lua file can be a pain, there are some converters out there (the one I have been using : http://gtamap.delux-host.com/converter/) But at least from what I had seen they only convert the objects, they do not care about scale, they do not convert removing world objects, vehicles, markers, peds.


So in order to be able to convert this better, without manually converting removeWorldObject from .map to removeWorldModel() for .lua (and a lot of other functions) I have created a MTA script which will convert the file for you without you requiring to do anything manually.


Installation & usage instructions


Installation



  • Download the installer: nanobob.net

  • Run the installer

  • The installer will ask if you want to replace your acl.xml file, if you have never before edited the acl.xml file click yes. If you have edited the acl.xml file proceed with the manual ACL instructions below

  • Once the installer has finished it will run your server, in the window type the following: "start editor", and type:"start mapconverter"


Manual ACL instructions:


:::


in order to add the resource to the ACL go to your server/mods/deathmatch folder.


turn your server off
open acl.xml with a text editor
under the line "<group name="Admin">"
add the line <object name="resource.mapconverter"></object> "
save the file and turn your server back on


:::


how to connect to your local server:


Go ingame.
Go to server browser.
Go to the local tab
Your server should be there.


Usage:


When ingame, turn on the editor ('start editor' in the console)


Also turn on the map converter ('start mapconverter' in the console) if you have not done so already


Now when you have finished mapping, click the save as button. There will be a checkbox with the text :"Save .lua copy". Check this checkbox and save the file, when it saves it will convert the file and output the file size.


By the way, the code is not compiled, feel free to use my code to learn from. But do not simply copy paste and call it your own.


Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...