Server - Custom command

Post your suggestions here
Post Reply
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Server - Custom command

Post by MxWayGamer »

Hi !

I'm working on a new server system and i think it will be very convenient to make a custom command.
For example to vote for the next track like this topic : http://forum.mxsimulator.com/viewtopic.php?f=15&t=41340
Or to note a track between 1-10 like : server, vote 8
Or again many other utilities.

Currently, we will make it with a website but it's not very ergonomic and intuitive.
Image
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Server - Custom command

Post by Wahlamt »

MxWayGamer wrote:Hi !

I'm working on a new server system and i think it will be very convenient to make a custom command.
For example to vote for the next track like this topic : http://forum.mxsimulator.com/viewtopic.php?f=15&t=41340
Or to note a track between 1-10 like : server, vote 8
Or again many other utilities.

Currently, we will make it with a website but it's not very ergonomic and intuitive.
Since it is not implemented in the actual server, you would have to approach it something like this:

When a race finish, you broadcast a message with 3 different tracks, like:
"What track should be on next? Type track_1 for "Rabbit hill", track_2 for "Waterloo Valley" or track_3 for "Alcrest". They you'd have to have some sort of listener that listens to the chat and after a minute decides which track got the more votes. So you'd have to make your own function that counts how many votes each "track_x" gets. Then you set that track with the server,settrack # as # being the one that got most votes.
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Re: Server - Custom command

Post by MxWayGamer »

It's possible to read a chat with a extern file ? If it's possible, we can make a custom command like this : "command, vote X" and the extern file make the modification in the server like you say.
Image
Wahlamt
Posts: 7934
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: Server - Custom command

Post by Wahlamt »

Read from "lastlog.txt" , that has all the info from the chat.
MxWayGamer
Crushed Dissenter
Posts: 326
Joined: Mon Oct 13, 2014 3:46 pm
Team: MTFactory

Re: Server - Custom command

Post by MxWayGamer »

Thanks, I will read this files.
Image
Post Reply