Scripts, Software and Other Stuff
-
- Crushed Dissenter
- Posts: 352
- Joined: Sat Oct 01, 2011 7:20 pm
- Team: Decal Works Racing
- Location: clinton, ontario, canada
Re: Scripts, Software and Other Stuff
i dont understand the demosplice thing. can somebody explain how i can do it
-
- Posts: 4
- Joined: Fri Aug 23, 2013 5:33 pm
- Team: Privateer
Re: Scripts, Software and Other Stuff
hey i'm new and i was wondering how i can add these scripts to a track or what ever where they are suposed to be.
thanks alot
thanks alot

-
- Posts: 1
- Joined: Thu Feb 06, 2014 12:28 pm
- Team: Privateer
Re: Scripts, Software and Other Stuff
I got pretty sick of having to type in Trackinfo additions manually for the serverargs.txt, so this will create an entry for every track you have in that folder. It's quick and dirty and you'll have to edit the params at the top yourself (and add any you want in the same style). Works fine on Linux, not tested on Windows.
Save as generateserverargs.py or whatever inside your MXServer folder. serverargs.txt outputs to the same folder as the one the script is run from.
Code: Select all
import os
import sys
from os.path import join, getsize
trackinfos = []
filepath = "FULL PATH TO YOUR MXS TRACKINFO FOLDER"
for dirpath, dirnames, files in os.walk(filepath):
for fil in files:
if fil.endswith('.trackinfo'):
trackinfos.append(fil)
f = open('serverargs.txt', 'w')
f.write('--port 19800\n')
f.write('--max-clients 11\n')
f.write('--greeting "PUT YOUR GREETING HERE"\n')
f.write('--results-file results.txt\n')
f.write('--track-interval 15\n')
f.write('--laps 5\n')
f.write('--no-arcade\n')
f.write('--admin YOUR ADMIN UID\n')
for track in trackinfos:
f.write('trackinfo/' + track + '\n')
f.close()
Save as generateserverargs.py or whatever inside your MXServer folder. serverargs.txt outputs to the same folder as the one the script is run from.
Return to “General Discussion”
Who is online
Users browsing this forum: xDkristianxD and 6 guests