The online racing simulator
.NET (C#) - Open Source Cruise Server
This is an open source InSim cruise application, released under the BSD licence.

However, if you do not understand even basic programming concepts or are unfamiliar with InSim and/or .NET, then this is not for you. In the current state you will need to modify the source in order to get it to work as you wish. There is also no documentation aside from the code itself.

It started out as a little hobby for myself 6 months ago, but turned into so much more. I eventually had it on a server, as UKTC cruise, but then changed to [MCC]Cruise. I grew tired of it all yesterday, and decided to just release the bloody thing! So here it is!

It uses T-RonX's LFS_External as a base, with parts of mcgas001's cruise tutorial thrown in for good measure. Both of these are excellent pieces of work, and a big thanks to both parties It is written in Visual C# by myself, dougie-lampkin (Rob Fenlon), and with no warranty or support whatsoever! I will try and help you if you ask an intelligent question, but please don't try and use this if you have no C# experience.

As this is an open project you do not need to wait for myself to fix bugs or add features. If you do modify it, please feel free to post an updated version.

I'm truly sorry for the slightly messy code, but it was my first ever C# experience, so I learnt as I progressed. This can be seen as parts of it are better practice than others...

Features:
  • Cash flow
  • Buy/Sell cars
  • Bank
  • Advanced police system
  • Trading mini-game
  • Random speed traps
  • Intelligent pit fines
  • Pitting from garages check
  • KM system (NOTE: It does count KMs, I just haven't added an on-screen display!)
  • Intelligent price-list
  • Admin refunds
  • Admin InSim update/restart features
  • Displays other's cash/cars at !stats
  • Swear filter
  • Negative cash protection
And much more...

Once again, this is a very large starting block to run your own cruise server. You will need at least basic understanding of programming concepts and what the InSim protocol is and can do, to take it further. There is little documentation aside from the code itself. If you do not heed this and at least try, then you will not get assistance.

v1.0.2 - http://www.lfsforum.net/showthread.php?p=801201#post801201

v1.0.1 - http://www.lfsforum.net/showthread.php?p=800515#post800515

v1.0.0 - Attached
Attached files
lfs_external_csf11.rar - 1.1 MB - 6859 views
i'll be the first to reply, when tested ill tell you how great it is

well, i dunno how to become a cop, the code says it reads it from a folder, wich i added, and still no result
Quote from kiss me :well, i dunno how to become a cop, the code says it reads it from a folder, wich i added, and still no result

Eh? All of the folders are there...In-game type "!addpolice USERNAME", and then you have officer rights
-
(kiss me) DELETED by the_angry_angel : Cleaning the thread.
-
(ReVoX) DELETED by the_angry_angel : Cleaning the thread.
can u use it in single player mode?
Quote from 91mason91 :can u use it in single player mode?

You "can" but it won't work 100%. It's easier to start a local host, and then use that...
i have no experiance with C# so how do i strt it up?
Quote from dougie-lampkin :please don't try and use this if you have no C# experience.

Quote from 91mason91 :i have no experiance with C# so how do i strt it up?

You read the instructions for a start...

You have to open the solution, go to form1.cs, change the admin password to be your own. Open the port in the LFS server (/insim=29969). Then run bin/release/LFS_External.exe...

My whole reasoning for posting a fully functional open source application was so that people wouldn't have to keep asking how to do this and that...
-
(91mason91) DELETED by the_angry_angel : Cleaning the thread.
-
(Robbo01) DELETED by the_angry_angel : Cleaning the thread.
-
(91mason91) DELETED by the_angry_angel : Cleaning the thread.
-
(Bose321) DELETED by the_angry_angel : Cleaning the thread.
-
(ReVoX) DELETED by the_angry_angel : Cleaning the thread.
-
(dougie-lampkin) DELETED by the_angry_angel : Cleaning the thread.
-
(91mason91) DELETED by the_angry_angel : Cleaning the thread.
-
(dougie-lampkin) DELETED by the_angry_angel : Cleaning the thread.
-
(Bose321) DELETED by the_angry_angel : Cleaning the thread.
-
(91mason91) DELETED by the_angry_angel : Cleaning the thread.
-
(Bose321) DELETED by the_angry_angel : Cleaning the thread.
-
(dougie-lampkin) DELETED by the_angry_angel : Cleaning the thread.
-
(91mason91) DELETED by the_angry_angel : Cleaning the thread.
-
(master_lfs.5101) DELETED by the_angry_angel : Cleaning the thread.
-
(shaun463) DELETED by the_angry_angel : Cleaning the thread.
-
(shaun463) DELETED by the_angry_angel : Cleaning the thread.
#8 - ReVoX
You can add/remove tracks to your liking, I just have them there, as AFAIK the other cruise servers have a different application for each track, and I wanted one application to do them all

v1.0.1 added, now has a settings.ini file, and the website is now a string at the top of the file
Attached files
v1.0.1.rar - 1.1 MB - 1761 views
Thanks Rob,I am going to see it.
I can't get addpolice, I use "!addpolice USERNAME", but insim say Not Autorized.
I can't find the source for insimreboot, but here's the program, just to keep it complete I'll include it with the next update, or if someone else makes an update please include it also
Attached files
INSIMREBOOT.rar - 4.4 KB - 1622 views
-
(ReVoX) DELETED by the_angry_angel : Cleaning the thread.
-
(Robbo01) DELETED by the_angry_angel : Cleaning the thread.
//
//Distance Button
//
InSim.Send_BTN_CreateButton("^6Distance: ^40." + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance + "km", Flags.ButtonStyles.ISB_DARK, 5, 25, 5, 5, 162, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);

This is my distance code so far, how do I get it to count properly?
It does count it ATM:

decimal SpeedMS = (decimal)(((MCI.Info[i].Speed / 32768f) * 100f) / 2);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance += Convert.ToInt32(SpeedMS);

It just doesn't display it on screen. That's in metres too, BTW...
So how on earth do I make it km? :S
lol don't you do maths? Divide by 1000

(1000m = 1km)
Sorry I know I figured that I should do / 1000 literally 30 seconds after my post .
-
(Shotglass) DELETED by the_angry_angel : Cleaning the thread.
douge what is the insimreboot program?

and can you set it to display a custom welcome message?\

edit: and whats the date thing in the users.txt file? whats the goods thingy mean? and can i remove cop rites? could you make a list of what each coumand and what it does.? when will you add the km counter?

and whats the seporator for the .txt file in the users folder if i want them to begin with more cars?
Quote from Shotglass :doug imho you should release it under copyleft to avoid the stupidity that surfaced in the cruise tutorial thread

I haven't thought of copyleft...I'll take a look, thanks


Quote from master_lfs.5101 :douge what is the insimreboot program?

http://www.lfsforum.net/showthread.php?p=800141#post800141

Basically it just restarts InSim remotely after I closed it to update it...


Quote from master_lfs.5101 :can you set it to display a custom welcome message?

Yes, just edit it...it's in the NCN method.


Quote from master_lfs.5101 :whats the date thing in the users.txt file? whats the goods thingy mean? and can i remove cop rites? could you make a list of what each coumand and what it does.? when will you add the km counter?

The date is the time the file was last edited, which is the time that the person left the server. It's put there for those people who try and say "But I've never been on the server!"...

The goods thing is a trading game, you can buy goods in bulk at the warehouse, and then send them on to other players at a higher price. It does need a bit of tinkering to be something that's worth it, probably by upping the amount of minimum goods you can buy.

If you open up form1.cs, and go to the MSO packet, you can see exactly what each command does. I'll add a list though next update.

As I said, it does count KMs. You just need to make a button to display them.


Quote from master_lfs.5101 : and whats the seporator for the .txt file in the users folder if i want them to begin with more cars?

It's a space between each car, like this:

"UF1 XFG XRG"

If you want someone to start out with more cars, go to FileInfo.NewUser, and there you can edit the cash and cars added to new accounts...
-
(master_lfs.5101) DELETED by the_angry_angel : Cleaning the thread.
-
(dougie-lampkin) DELETED by the_angry_angel : Cleaning the thread.
-
(master_lfs.5101) DELETED by the_angry_angel : Cleaning the thread.
-
(Bose321) DELETED by the_angry_angel : Cleaning the thread.
-
(Robbo01) DELETED by the_angry_angel : Cleaning the thread.
some know where to fins lotto ticets ? ?? for collect it..
-
(Bose321) DELETED by the_angry_angel : Cleaning the thread.
They are currently mapped to my layout (which wasn't made by me, that's why it isn't in there), so you'll have to move them yourself...
the warehouse is in the un used pits (fake pits, old pits) and so is the lottery just drive in them and find out the lotto drop of point is near the corner that splits in two u can go round the outside or the inside but the inside has a barrier going across is on one of them sides, and the bank is at the first corner i think the one with the deep hole in the sand trap.
-
(ReVoX) DELETED by the_angry_angel : Cleaning the thread.
There's already a button for it in the BL section, but it will only show onto my username currently. Move it around as you need it, and set it to your username
Error in the Bank robber's UCID, pointed out by imthebestracerthereis. I've changed the RobberUCID's default from 0, to -1, so it doesn't interfere with normal UCIDs. It just means changing it to an int, and setting it to -1 anywhere it was being set to 0. Updated version here:
Attached files
v1.0.2.rar - 1.2 MB - 6606 views
-
(master_lfs.5101) DELETED by the_angry_angel : Cleaning the thread.
-
(master_lfs.5101) DELETED by the_angry_angel : Cleaning the thread.
-
(dougie-lampkin) DELETED by the_angry_angel : Cleaning the thread.
Thanks again Rob for this . I am currently working on the [NC] Cruise App and this has taught me loads. BTW / 1609 = Miles and / 1000 = KM.
Quote from dougie-lampkin :

decimal SpeedMS = (decimal)(((MCI.Info[i].Speed / 32768f) * 100f) / 2);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance += Convert.ToInt32(SpeedMS);


This method doesnt works , in a bl lap it counts over 4 km (bl has 3.3)

.NET (C#) - Open Source Cruise Server
(505 posts, started )
FGED GREDG RDFGDR GSFDG