Jump to content

Map editor (Spawn)


davve95

Recommended Posts

  • Discord Moderators

Go to your MTA resources directory and open editor_main

Go to server -> playerspawn.lua

Change line 5 and 14 to whatever spawn you please.

For ease, you could define them at top and use them both places.

Link to comment
  • Discord Moderators

MTA scripting is based on LUA, yes.

Reference manual here, and the scripting introduction here.

Once you've understood both, it won't be hard to perform edits like these yourself.

However I'll help you on this task in case you're not interested in learning LUA.

Before you edit LUA files, I strongly recommend using a source code editor like Notepad++ with LUA syntax highlighting.

What I said in my first post with playerspawn.lua is wrong, I thought the camera would sync with the player position on start, but there's a separate value for that.

1) Open editor_main

2) Go into client -> main.lua

3) Alter line 50 to fit your needs.

4) Retrieve a position by typing /getpos while freeroam is running. Fit the values in there.

5) For example, to start at SF airport:

local START_X, START_Y, START_Z = -1361, -114, 608 

If you're working on a zip archive, remember to update the files.

Good luck :)

sidenote: might wanna move this into the scripting section

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...