I believe that this is by far the most successful project I have worked on in my LFS time. And since I'm not really active in LFS lately, and -OsR- isn't up either, I decided to post the source of it. I really wanted to do this earlier, but I just couldn't find the time, or the mood.
Big thanks to:
T-RonX for LFS_External, which is used as the main base for this project;
DarkTimes for InSimSniffer, from which I stole a few things (yeah, again) ;
morpha for so much stuff, that I'm even lazy to write them down. Luv u {} (as a friend of course.. I'm not gay ..much);
dougie-lampkin for Open Source Cruise Server, from which I have learned the basics of C#.
And bah... Gotta include a license again, don't I?
I've always hated that part. But here goes..
On 2nd thought: I'm just going to stick with the MIT license, but still post it anyway:
Ok, so.. Some advices to get you started.
Database server configuration settings are in the dbProcess class.
It is pretty obvious which ones they are, but I would feel more comfortable if I show them to you here. So, there they are:
It's more than obvious what's for what, so I'm not going to explain any further. I will attach an sql file, which you will need in order for the whole system to work as it should. You will see a lot of fields that aren't being used. That's cause I planned it to be a much bigger project, but I was just a lazy kid.
LFS Server configuration settings are being set in settings.ini. A file that should always be in the same folder as the built exe. In case you lose it, here is a copy of it as is when you first download the project:
Little explanation about that last line is probably what you want right now. Ok, so, basicaly, this is a string, representing the allowed cars, that users are able to pick for the next race.
The 01 in front of them, I think should not be changed, because it is read by the so called matrix system(it was my best invention at that time, and I knew nothing about binary, so I had to give it a killer name ). Basically, that 01 is doing nothing more but to tell the matrix functions that the string contains only 1 digit numbers.
For example: If you wanted the same string, but with 02 in front, you would have to put a zero in front of each 1 after that, or in other words: make it like that - 020101010101010101010101010101010101010101, so that ones can stay ones. That's just in case you want to use the matrix system for other purposes. It isn't really necessary at the current state of the insim, but I told you already: I had further plans for it. Had is the keyword.
Well, let me not keep you busy with more useless information. There's the source and have fun with it.
Big thanks to:
T-RonX for LFS_External, which is used as the main base for this project;
DarkTimes for InSimSniffer, from which I stole a few things (yeah, again) ;
morpha for so much stuff, that I'm even lazy to write them down. Luv u {} (as a friend of course.. I'm not gay ..much);
dougie-lampkin for Open Source Cruise Server, from which I have learned the basics of C#.
And bah... Gotta include a license again, don't I?
I've always hated that part. But here goes..
On 2nd thought: I'm just going to stick with the MIT license, but still post it anyway:
Copyright (c) 2010 Loran Mutafov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Ok, so.. Some advices to get you started.
Database server configuration settings are in the dbProcess class.
It is pretty obvious which ones they are, but I would feel more comfortable if I show them to you here. So, there they are:
static public string dbServer = "database IP";
static public string dbPort = "database PORT | default: 3306";
static public string dbUser = "database USER";
static public string dbPass = "database PASS";
static public string dbDatabase = "database DATABASE";
It's more than obvious what's for what, so I'm not going to explain any further. I will attach an sql file, which you will need in order for the whole system to work as it should. You will see a lot of fields that aren't being used. That's cause I planned it to be a much bigger project, but I was just a lazy kid.
LFS Server configuration settings are being set in settings.ini. A file that should always be in the same folder as the built exe. In case you lose it, here is a copy of it as is when you first download the project:
Admin adminpassGOESHERE
Port portGOESHERE
IP ipGOESHERE
carsGlobStr 0111111111111111111111
Little explanation about that last line is probably what you want right now. Ok, so, basicaly, this is a string, representing the allowed cars, that users are able to pick for the next race.
The 01 in front of them, I think should not be changed, because it is read by the so called matrix system(it was my best invention at that time, and I knew nothing about binary, so I had to give it a killer name ). Basically, that 01 is doing nothing more but to tell the matrix functions that the string contains only 1 digit numbers.
For example: If you wanted the same string, but with 02 in front, you would have to put a zero in front of each 1 after that, or in other words: make it like that - 020101010101010101010101010101010101010101, so that ones can stay ones. That's just in case you want to use the matrix system for other purposes. It isn't really necessary at the current state of the insim, but I told you already: I had further plans for it. Had is the keyword.
Well, let me not keep you busy with more useless information. There's the source and have fun with it.