Skip to content

pkfln/mta-discord-rpc

Repository files navigation

Issues MIT License


Logo

MTA Discord Rich Presence

External Rich Presence Manager for Multi Theft Auto: San Andreas.

Report an issue

Table of Contents

Installation

Testing

First make sure it works for you before you install it. It's recommended to be on the latest Windows 10 Build (I haven't tested it on any other OS or earlier versions of Windows). You will also need to play MTA:SA through its proxy application, so Discord doesn't pickup default GTA:SA as the current playing game.

  1. Make sure your MTA:SA uses proxy_sa.exe instead of gta_sa.exe. To check this, open your Task Manager and see which one of both applications is running while you have MTA:SA open. Click here to learn how to force this behaviour.
  2. Close your MTA:SA instance if you have it running.
  3. Download the newest release from the releases page (mta-discord-rpc.exe).
  4. Open the folder containing the downloaded executable.
  5. Execute the file by double-clicking it.
  6. If you're not getting any errors, try to open MTA:SA.
  7. Check your Discord Rich Presence status and see, if it's setting your status.
  8. If everything works so far, you're ready to install it. If you do get some errors, try to fix them or open a new issue. Also don't forget to check the Troubleshooting section.

Installing

  1. Press Win + R, you should then see the Run window.
  2. Type in shell:startup and press Enter.
  3. Either create a shortcut to the executable you just downloaded or move it into this new folder window.
  4. Next time you login to your Windows, mta-discord-rpc will automatically start.

To uninstall it / disable it from the Windows startup, simply delete the downloaded executable or the shortcut you created.

Updating

To update, close MTA:SA and mta-discord-rpc.exe (through the Task Manager). Then download the latest build from the releases page and repeat the installation process.

Why?

Since you can't really make clientsided modifications for MTA (or at least not that I know of), I decided to do it this way, so that it doesn't interfer with the actual process and is fully external. MTA had rich presence support in the past, but it got removed for some reason.

Adding server assets

If you want your server logo to be shown on the rich presence instead of the default MTA logo, create a pull request with your server logo.

  1. Fork this project
  2. Create your branch (e.g. asset/my-server): git checkout -b asset/my-server
  3. Add your server logo in the assets directory. Make sure your logo has a background and a minimum size of 512x512 (1024x1024 recommended). Only PNGs are currently supported. Name your file in the following format: [ip]_[port].png (no hostnames).
  4. Stage your file: git add assets/127.0.0.1_22003.png
  5. Commit your changes: git commit -m 'Add server logo for Localhost'
  6. Push your new changes: git push origin asset/my-server
  7. Open a Pull Request

Troubleshooting

Discord shows "Grand Theft Auto: San Andreas" as my current game

You must force MTA:SA to use their proxy application. The easiest method probably is installing an ASI loader: Download Silent's ASI Loader here and add & replace these files to your GTA:SA directory.

Discord shows "MTA: San Andreas" as my current game

You probably added it manually to your Game Activity detection list. Remove it from there in the Discord settings.

Rich presence is not showing MTA anymore, even though I restarted MTA multiple times already

Logout from Windows & log back in, that should fix it.

The status gets set to "Idle", even though I'm still connected to the server

This often happens on servers which change your MTA:SA nickname (for instance, when you login to a server with a custom account system). Make sure the nickname you've set in the MTA:SA settings is equal to the one you have on the server you're connected to. "Supernicks" (the ones you set on a specific server to be able to use multiple color codes in your name) shouldn't matter, since they usually don't change your real MTA:SA nickname. If this isn't reproducible, it probably happened while the server was lagging / your ping to the server was very high for a longer period.

Contributing

Coming soon.

Known bugs

  • Having multiple Discord instances open won't display the rich presence

License

Distributed under the MIT License. See LICENSE for more information.