caden__s144 wrote:can you change the server ip from yours to a custom name??

That's DNS side, you have to buy a domain name and add a pointer to your IP.

i.e. you buy MYDOMAIN.com and you can redirect mx.mydomain.com to your IP 10.10.10.10 then your router has to NAT the requests to the mxsim server port (19800 ie.).

This is exactly what I have done. I have purchased "storkenmxs.com" and let the sub-domain "server.storkenmxs.com" redirect the user to my IP at home, then it forwards the traffic on the port 19800 to my PC. If I have my mx sim server running, people get connected to it.

While reading this Nate, it really came in useful. This time I tried my luck with sending packages to the server. I modified the code you provided a bit, so you can with this enter any command you want, as the terminal will prompt you for the command. Also I added the #/usr/bin/python in the beginning, not really sure if that is needed, but since I didn't want to put it in the root dir, I assumed it might be good to have.

The modification here is that it cuts out after the "xPASSWORD" part and prompts the user for a command. The "server," part of the command is not needed as you'd type it in a server, if anyone wonders. When it prompts you, let's say you want to set the track 5, then type "settrack 5" without the quotation marks. If you'd like to broadcast a message, then type "broadcast This is a cool broadcast message for you!". This is my first time trying to do something useful with python so there might be better ways to do this than I was able to do, also maybe someone has made it before. Yet I though I could share it

So I made this too, in hopes that it would be able to be a simple solution for people at home, but unfortunately not. It is yet another way to send commands to a server, via a web interface, looking like this

Now onto the problemsWhen I made this, I had in mind that it should work really simple, you install a web server (XAMPP for example) and put the folder in place. Unfortunately it worked... sort of... Upon installing XAMPP (LAMPP on Linux) on my Ubuntu 16.04 machine, I apparently got "sockets" installed with the PHP, allowing you to create "sockets" that can send UDP packages to localhost (send the commands to your local server). However on my windows machine when I installed XAMPP, I did not get the "sockets" extension included, so it did not work on my windows machine, took a while to figure out why.. So ultimately, it works fine with XAMPP on my Ubuntu 16.04LTS machine, but not on windows as of now.

If you decided to download it, just change the "x1234" part in the file called "phpudp.php", it's commented right above it in the code so it should be easy to understand.DownloadWhat's included?

The normal page shown above

A .php and a .py file if you rather would like to call php to execute a .py script instead of doing it just in normal php. If this is a bigger desire, just change in "scripts.js" to that php (runcommand.php) file and it'll call the .py script.

Command.py is the same as 2 posts ago, a script that you launch in the terminal, it asks you for a command, you enter it and the script sends the package. To note, this script is not valid in python 3.x

Also, I did NOT get the webpage (php) to work as I wanted in Apache2 on my linux machine.

Wahlamt wrote:While reading this Nate, it really came in useful. This time I tried my luck with sending packages to the server. I modified the code you provided a bit, so you can with this enter any command you want, as the terminal will prompt you for the command. Also I added the #/usr/bin/python in the beginning, not really sure if that is needed, but since I didn't want to put it in the root dir, I assumed it might be good to have.

The modification here is that it cuts out after the "xPASSWORD" part and prompts the user for a command. The "server," part of the command is not needed as you'd type it in a server, if anyone wonders. When it prompts you, let's say you want to set the track 5, then type "settrack 5" without the quotation marks. If you'd like to broadcast a message, then type "broadcast This is a cool broadcast message for you!". This is my first time trying to do something useful with python so there might be better ways to do this than I was able to do, also maybe someone has made it before. Yet I though I could share it

Thanks for posting, this works great . I added one thing to it, if at the end of the script you put

Where sendcommands.py is whatever name you gave the script, it'll "keep" the prompt open (it really just opens it again) so you don't have to reopen it every time you want to send another command.

I'll add it to the first post .

Also jlv something I noticed, if you send a command to broadcast, it shows in the server but doesn't show in the server cmd window. If you send it from in game it does show it in the cmd window, why is that?

TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.

yzmxer608 wrote:Also jlv something I noticed, if you send a command to broadcast, it shows in the server but doesn't show in the server cmd window. If you send it from in game it does show it in the cmd window, why is that?

Not sure. My current source prints it on the console both ways, but I've added more logging since the last posted server version. There have been enough changes I should probably make a new server release.

Josh VanderhoofSole Proprietorjlv@mxsimulator.comIf you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.

jlv wrote:Not sure. My current source prints it on the console both ways, but I've added more logging since the last posted server version. There have been enough changes I should probably make a new server release.

Please make a --mutefile.txt or something so people can stay muted after the server is shut down and restarted