Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: How to make a race in... SA-MP Map editor (because MTA doesn't work)  (Read 46 times)

Offline ohmios

  • VIP
  • Jumbo Shrimp
  • *
  • *
  • Posts: 134
  • Reputation Power: 0
  • ohmios
  • believe it
    • View Profile


MTA doesn't work for you but you're burning for making a race track? I got the ugly workaround you've been waiting for.

I'll asume you already know how to use SA-MP Map Editor

First you need SA-MP Map Editor by JernejL http://www.mathpudding.com/topsecretsamp/editor.rar
This thing (like MTA) it's open source so if you know pascal you can see the source code here https://github.com/JernejL/samp-map-editor

Then you need a script that converts .pwn to MTA's xml race format https://forum.teamshrimp.com/index.php?action=dlattach;topic=1038.0;attach=519

Uncompress both files. You can use 7zip http://www.7-zip.org/download.html

To run the script you will need Python 3. If you're on Linux you probably have it already.
If you're on Windows 7,8 or 10 download this https://www.python.org/ftp/python/3.6.3/python-3.6.3.exe
If you're on Windows XP download this https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi

double click the exe and install python. the installer should be self-explanatory.

Now in SA-MP Map Editor you pretty much do the race as you would in MTA, except that you can't change the checkpoint size in the gui.

This is how it goes:
  • For spawnpoints simply use any car IDs (400-611).
  • It's very important to create the checkpoints in the natural order you want the player to follow them.
  • For normal checkpoints you can use ID 19945 or ID 19947. It's very important to use ID 19946 for the last checkpoint as finish line.
  • For checkpoints of type ring you can use ID 3438. Or for big ring checkpoints use ID 13623.
  • For nitro pickups use any of the nitro objects IDs (1008, 1008 and 1010).
  • For repair pickups use ID 3096.
  • All other IDs are normal objects in the race.

Once you finish your race export it by clicking Show Code, then Export. Make sure CreateObject is selected (it is by default):
  • Copy and paste your .pwn to the script's folder and rename it to race1.pwn
  • Double-click win-pwn2xml.bat if you're on Windows or run pwn2xml.py with python in a terminal if you're on Linux
  • The script will ask you for the race name and the author's name
  • It will create a folder with the the .map and the meta file, DO NOT EDIT ANY FILE OR FOLDER NAME UNLESS YOU KNOW WHAT YOU'RE DOING
  • Compress folder and send it to nickd25 or badger

That's it you made a race that's compatible with TeamShrimp. It will also work with MTA as long as you didn't add SA-MP objects.
Easy. Right?  :rofl:
Don't say it doesn't work because so far i made 3 race tracks with this editor and the script.
BTW SA-MP Map editor is also what Badger use to make sumo maps.
« Last Edit: October 14, 2017, 02:51:54 AM by ohmios »

Offline ohmios

  • VIP
  • Jumbo Shrimp
  • *
  • *
  • Posts: 134
  • Reputation Power: 0
  • ohmios
  • believe it
    • View Profile
fixed
« Reply #1 on: October 08, 2017, 06:16:44 AM »
Fixed the problem with the script on windows, also made the python that I bundle smaller by deleting some stuff that it didn't need to run the stupid 50 line script. And downgrade the Python version to 3.4.4 which does run on Windows XP (and under Wine).
I updated the link, download it again and delete the previous one. All the instructions apply just the same.


Final Solution: Make the user install python on his own.

The script now generates the meta file, no need to edit it by hand anymore.

updated the download link of the script since the website i was using to share it was reported as dangerous.
« Last Edit: October 14, 2017, 02:50:13 AM by ohmios »