• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 29, 2024, 01:37:32 PM

News:

MX Bikes beta18j available! :)


MxBikes URL Protocol Handler script

Started by Niko Mouk, January 22, 2020, 10:17:03 PM

Previous topic - Next topic

Niko Mouk

Hey dear developers,
Would it be possible to give us the MxBikes URL Protocol Handler script ?
The goal is to make the Steam versions able to open servers URL. Need it for the racing website I'm working on.

Thanks  :)
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

PiBoSo


The URL format is:
mxbikes://ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories

"local_ip:local_port" is usually the same as "ip:port". It's only useful for clients connecting from the same LAN.
"password" must be 0 or 1. 1 if the server is password protected.
"layout_id" must be empty if the base layout is used.

Niko Mouk

Thank you, so for people who needs it the full schema is :
mxbikes.exe -connect "ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories"
Here is the registry script needed, make sure to adapt the game path to yours:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\mxbikes]
@="URL:MX Bikes"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\mxbikes\DefaultIcon]
@="E:\\Steam\\SteamApps\\common\\MX Bikes\\mxbikes.ico"

[HKEY_CLASSES_ROOT\mxbikes\shell]

[HKEY_CLASSES_ROOT\mxbikes\shell\open]

[HKEY_CLASSES_ROOT\mxbikes\shell\open\command]
@="E:\\Steam\\SteamApps\\common\\MX Bikes\\mxbikes.exe -connect \"%1\""

To run it, copy the code into a text file, save, change the file extension to .reg and double click it.
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

PiBoSo

Quote from: Niko Mouk on January 24, 2020, 09:06:12 AMThank you, so for people who needs it the full schema is :
mxbikes.exe -connect "ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories"

Please note that the protocol must be added, too:
mxbikes.exe -connect "mxbikes://..."

Niko Mouk

Hey ! If you like my work, you can 💰 donate on Paypal, thank you !