The online racing simulator
Azzano62... Want this Distance Button in C# ?
my first post was incorrect
( sorry wrong thread )

sure if u have a code it would be helpful
For clsConnectionc C:

InSim.Send_BTN_CreateButton(C.TotalDistance / 1000 + " KM", Flags.ButtonStyles.ISB_DARK, 5, 25, 12, 64, 20, C.UniqueID, 2, false);


For MSO_MessageOut:

InSim.Send_BTN_CreateButton(Connections[GetConnIdx(MSO.UCID)].TotalDistance / 1000 + " KM", Flags.ButtonStyles.ISB_DARK, 5, 25, 12, 64, 20, MSO.UCID, 40, false);


Say if u need this button in other classes. Remember, change 12 and 64 for positions.
thank you very much just what i needed
Problems?
Hi,

I just set this up on my server and am having a few issues I was wondering if anyone could resolve.
  • I can't get it to appear in the server browser as a cruise server
  • How to change the speed limit?
  • Im an admin but can seem to do the !office thing as it says im not authorised.
  • How do we get speed guns or radars if were police? And how do we enter into chase.
  • It says wrong way, allthough weve enabled wrong way on the game panel it still says it.
  • We can't seem to set layouts it says " no file found "

Any help greatly appreciated,
Quote from opi4613 :Hi,

I just set this up on my server and am having a few issues I was wondering if anyone could resolve.
  • I can't get it to appear in the server browser as a cruise server
  • How to change the speed limit?
  • Im an admin but can seem to do the !office thing as it says im not authorised.
  • How do we get speed guns or radars if were police? And how do we enter into chase.
  • It says wrong way, allthough weve enabled wrong way on the game panel it still says it.
  • We can't seem to set layouts it says " no file found "
Any help greatly appreciated,
  • /cruise=yes
  • change the part that's red
    if ((MCI.Info[i].Node >= 0) && (MCI.Info[i].Node < 322))
    {
    InSim.Send_BTN_CreateButton("^7The Track", Flags.ButtonStyles.ISB_CLICK, 4, 20, 3, 85, 171, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);
    InSim.Send_BTN_CreateButton("^7[COLOR=Red]75 km/h[/COLOR]", Flags.ButtonStyles.ISB_CLICK, 4, 20, 3, 95, 172, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);
    }

  • You need to manually add your username to police in /users/groups/police.txt as format: Officer = <username>
  • !settrap <speed you want to clock the person at> / afaik, there is no command to enter chase, someone clarify
  • /cruise=yes
  • the layout needs to be in your /data/layout in your dedicated server or LFS host.
Thanks for your help ^^^

Are you guys sure there is not a chase function? I had a guy on my server saying there was he was the guy who supposedly made the script.



Also I have a coyple of other questions?
1) it says your site on the top right control bit is there a way to change this.
2) Surely there must be a chase function somewhere?????
Quote from opi4613 :Thanks for your help ^^^

Are you guys sure there is not a chase function? I had a guy on my server saying there was he was the guy who supposedly made the script.



Also I have a coyple of other questions?
1) it says your site on the top right control bit is there a way to change this.
2) Surely there must be a chase function somewhere?????

yes here is the code in form1 at the top

using System;
using System.Windows.Forms;
using System.Collections.Generic;
using LFS_External;
using LFS_External.InSim;
using System.Threading;
using System.IO;

namespace LFS_External_Client
{
public partial class Form1 : Form
{
// Main InSim object
InSimInterface InSim;

const string UserInfo = @"users";
const string [COLOR=Red]Website[/COLOR] = "[COLOR=Red]^2720team.co.uk[/COLOR]";

// Note - do NOT change the settings here. Use the settings.ini file instead!
string AdminPW = "default";
ushort Port = 29999;
string IPAddress = "127.0.0.1";

System.Timers.Timer PayUser = new System.Timers.Timer(1000);
System.Timers.Timer CheckUser = new System.Timers.Timer(2000);
System.Timers.Timer BankTimer = new System.Timers.Timer(1);
System.Timers.Timer BankCooldown = new System.Timers.Timer(1);
System.Timers.Timer BackUp = new System.Timers.Timer(300000);


// These are the main lists that contain all Players and Connections (Being maintained automatically)
List<clsConnection> Connections = new List<clsConnection>();
List<clsPlayer> Players = new List<clsPlayer>();

type !engage to start a chase if you are on duty type !officer to go on duty if you dont know how

hope this helps
I translatet a lot of it in german but it wouldn´t work it´s still in english
Open in in Visual Studio, then compile with F6
OK Thanks
How i move this?
I use MS Visual C# 2008 EE.
Attached images
x.JPG
Quote from zimuli :I use MS Visual C# 2008 EE.

erm lol

change coordinates from buttons
Can i move it in the game?
Or if in the the source, where there, what i have to change?

I have a working LFS dedicated server at home with this cruising server.
Its first time a try to "program" my self :-/
I change the admin password and small text things etc. so i get it to work but to move the button in screen, that i dont know....
Quote from zimuli :Can i move it in the game?
Or if in the the source, where there, what i have to change?

I have a working LFS dedicated server at home with this cruising server.
Its first time a try to "program" my self :-/
I change the admin password and small text things etc. so i get it to work but to move the button in screen, that i dont know....

you need to find them in the code and then u can edit the co-ordinates

co-ordinates are like this

InSim.Send_BTN_CreateButton(" ", Flags.ButtonStyles.ISB_DARK, 30, 100, 40, 50, 1, NCN.UCID, 2, false);

Height
30,

Width
100,

Position Up/Down
40,

Position Left/Right
50,

Button ID
1
Quote from Robbo01 :you need to find them in the code and then u can edit the co-ordinates

co-ordinates are like this

InSim.Send_BTN_CreateButton(" ", Flags.ButtonStyles.ISB_DARK, 30, 100, 40, 50, 1, NCN.UCID, 2, false);

Height
30,

Width
100,

Position Up/Down
40,

Position Left/Right
50,

Button ID
1

Thank you!

I get i work, it was suprise to me in how many place in code you have to change this to get the button to move ....

Another thing, how and where is the right way to leave the game?
Im in the garage when i leave and text is green, but i get fined 1500.
-
(Azzano62) DELETED by Azzano62
Hi
Where i can find all command list off cruise server ?
You can find every command in Form1.CS
Im interested in this but dont really understand. Is there a track for this insim? Idk is some1 would be willing to make a generic track and the insim to correspond with it for free. But im not really all that sure of this. Just a basic track with bank kindergarten pizza etc. It can be premade allready or existing i just am not sure how to get this insim to know what place is what etc.
Quote from Bmxtwins :Im interested in this but dont really understand. Is there a track for this insim? Idk is some1 would be willing to make a generic track and the insim to correspond with it for free. But im not really all that sure of this. Just a basic track with bank kindergarten pizza etc. It can be premade allready or existing i just am not sure how to get this insim to know what place is what etc.

Do like we all did. Start modding tiny things till you get it. To me personally it wasn't really easy to understand how to locate a player on the map but once you get it it's pretty easy. It doesn't work just like that.. click and you get a bank, click and you get a shop(but I'm sure you're aware of that).. Do it step by step and you might become a really good programmer.

I'm saying this because if you want someone to do it for you it's going to take you longer than the variant to learn how to make it yourself imo. But it's your call, I'm just suggesting, you know. Anyway, whatever you choose - good luck with it.
Like i said 0% code awareness.
Quote from Bmxtwins :Like i said 0% code awareness.

You know english => you can understand how to code. Coding is like learning a new language... Thats why they call them languages too. Coding on C# is like learning a bit different way to type in english. Excuses can always be found tho, so if you don't want to learn how to code then just don't, noone will force you to.
Instead of it saying (LFS username) Mikjen Pitted, how do i make it say [cop] Mick Pitted

Did see it somehwere once, but cant find it again

tia
Mick

oops sorry thought it was in the insim post dougie created
u will have something like this

foreach (clsConnection C in Connections)
{
InSim.Send_MST_Message("/msg ^6|^3 " + C.PlayerName + " Pitted");

or

InSim.Send_MST_Message("/msg ^6|^3 " + Connections[GetConnIdx(Players[GetPlyIdx(PLP.PLID)].UniqueID)].PlayerName + " Pitted");

Thanks m8

Changed it from this and it works fine

Quote :.Username + " Pitted

Quote :UniqueID)].PlayerName + " Pitted");




Mick

FGED GREDG RDFGDR GSFDG