The online racing simulator
Searching in All forums
(539 results)
Trekkerfahrer
S3 licensed
now it works, thank you very much

ok, now i have fresh code and now i would like to know about buttons
if this here would be too spamlike for you ( ithink victor has a similar opinion ^^ ) we can talk over ICQ about when you want

here is my number: 278198631
Trekkerfahrer
S3 licensed
hmmm, its already in there.... i think you should have a look at the code


using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;
using LFS_External.InSim;

namespace LFS_External_Client
{
public partial class Form1 : Form
{
// InSim objects
InSimInterface InSim;
ConnectionSettings cfg;

// 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>();

public Form1()
{
InitializeComponent();
InitializeInSimEvents(); // Event handlers (Uncoment a line in here to enable a packet receive event)
}

// Form load
private void Form1_Load(object sender, EventArgs e)
{
try
{
// Connect to InSim
cfg = new ConnectionSettings("127.0.0.1", 29999, 0, Flags.InSimFlags.ISF_MCI | Flags.InSimFlags.ISF_MSO_COLS, '!', 1000, "password", "^3TestProg");
InSim = new InSimInterface(cfg);
InSim.Connect();

// Leave this
Thread.Sleep(500);

// Request all players and connections
InSim.Send_TINY(Enums.Tiny.TINY_NPL, 255);
InSim.Send_TINY(Enums.Tiny.TINY_NCN, 255);
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}

// Close button
private void btnClose_Click(object sender, EventArgs e)
{
InSim.Close();
Application.Exit();
}

#region Default Methods
// Uncomment a line in this method to enable its event.
private void InitializeInSimEvents()
{
//LFS_External.InSim.Events.AXC_Received += new LFS_External.InSim.Events.AXC_EventHandler(AXC);
//LFS_External.InSim.Events.AXI_Received += new LFS_External.InSim.Events.AXI_EventHandler(AXI);
//LFS_External.InSim.Events.AXO_Received += new LFS_External.InSim.Events.AXO_EventHandler(AXO);
//LFS_External.InSim.Events.BTC_Received += new LFS_External.InSim.Events.BTC_EventHandler(BTC);
//LFS_External.InSim.Events.BTT_Received += new LFS_External.InSim.Events.BTT_EventHandler(BTT);
//LFS_External.InSim.Events.BFN_Received += new LFS_External.InSim.Events.BFN_EventHandler(BFN);
//LFS_External.InSim.Events.CCH_Received += new LFS_External.InSim.Events.CCH_EventHandler(CCH);
//LFS_External.InSim.Events.CLR_Received += new LFS_External.InSim.Events.CLR_EventHandler(CLR);
LFS_External.InSim.Events.CNL_Received += new LFS_External.InSim.Events.CNL_EventHandler(CNL);
//LFS_External.InSim.Events.CPP_Received += new LFS_External.InSim.Events.CPP_EventHandler(CPP);
LFS_External.InSim.Events.CPR_Received += new LFS_External.InSim.Events.CPR_EventHandler(CPR);
//LFS_External.InSim.Events.CRS_Received += new LFS_External.InSim.Events.CRS_EventHandler(CRS);
//LFS_External.InSim.Events.FIN_Received += new LFS_External.InSim.Events.FIN_EventHandler(FIN);
//LFS_External.InSim.Events.FLG_Received += new LFS_External.InSim.Events.FLG_EventHandler(FLG);
//LFS_External.InSim.Events.III_Received += new LFS_External.InSim.Events.III_EventHandler(III);
//LFS_External.InSim.Events.ISM_Received += new LFS_External.InSim.Events.ISM_EventHandler(ISM);
//LFS_External.InSim.Events.LAP_Received += new LFS_External.InSim.Events.LAP_EventHandler(LAP);
//LFS_External.InSim.Events.MCI_Received += new LFS_External.InSim.Events.MCI_EventHandler(MCI);
//LFS_External.InSim.Events.MPE_Received += new LFS_External.InSim.Events.MPE_EventHandler(MPE);
//LFS_External.InSim.Events.MSO_Received += new LFS_External.InSim.Events.MSO_EventHandler(MSO);
LFS_External.InSim.Events.NCN_Received += new LFS_External.InSim.Events.NCN_EventHandler(NCN);
//LFS_External.InSim.Events.NLP_Received += new LFS_External.InSim.Events.NLP_EventHandler(NLP);
LFS_External.InSim.Events.NPL_Received += new LFS_External.InSim.Events.NPL_EventHandler(NPL);
//LFS_External.InSim.Events.PEN_Received += new LFS_External.InSim.Events.PEN_EventHandler(PEN);
//LFS_External.InSim.Events.PFL_Received += new LFS_External.InSim.Events.PFL_EventHandler(PFL);
//LFS_External.InSim.Events.PIT_Received += new LFS_External.InSim.Events.PIT_EventHandler(PIT);
//LFS_External.InSim.Events.PLA_Received += new LFS_External.InSim.Events.PLA_EventHandler(PLA);
LFS_External.InSim.Events.PLL_Received += new LFS_External.InSim.Events.PLL_EventHandler(PLL);
//LFS_External.InSim.Events.PLP_Received += new LFS_External.InSim.Events.PLP_EventHandler(PLP);
//LFS_External.InSim.Events.PSF_Received += new LFS_External.InSim.Events.PSF_EventHandler(PSF);
//LFS_External.InSim.Events.REN_Received += new LFS_External.InSim.Events.REN_EventHandler(REN);
//LFS_External.InSim.Events.REO_Received += new LFS_External.InSim.Events.REO_EventHandler(REO);
//LFS_External.InSim.Events.REPLY_Received += new LFS_External.InSim.Events.REPLY_EventHandler(REPLY);
//LFS_External.InSim.Events.RES_Received += new LFS_External.InSim.Events.RES_EventHandler(RES);
//LFS_External.InSim.Events.RST_Received += new LFS_External.InSim.Events.RST_EventHandler(RST);
//LFS_External.InSim.Events.RTP_Received += new LFS_External.InSim.Events.RTP_EventHandler(RTP);
//LFS_External.InSim.Events.SPX_Received += new LFS_External.InSim.Events.SPX_EventHandler(SPX);
//LFS_External.InSim.Events.STA_Received += new LFS_External.InSim.Events.STA_EventHandler(STA);
LFS_External.InSim.Events.TOC_Received += new LFS_External.InSim.Events.TOC_EventHandler(TOC);
//LFS_External.InSim.Events.VER_Received += new LFS_External.InSim.Events.VER_EventHandler(VER);
//LFS_External.InSim.Events.VTA_Received += new LFS_External.InSim.Events.VTA_EventHandler(VTA);
//LFS_External.InSim.Events.VTC_Received += new LFS_External.InSim.Events.VTC_EventHandler(VTC);
//LFS_External.InSim.Events.VTN_Received += new LFS_External.InSim.Events.VTN_EventHandler(VTN);
}

// Methods for automatically update Players[] and Connection[] lists (Called from NPL and NCN)
private void RemoveFromConnectionsList(Packets.IS_CNL CNL)
{
// Copy of item to remove
clsConnection RemoveItem = new clsConnection();

// Check what item the connection had
foreach (clsConnection Conn in Connections)
{
if (CNL.UCID == Conn.UniqueID)
{
// Copy item (Can't delete it here)
RemoveItem = Conn;
continue;
}
}

// Remove item
Connections.Remove(RemoveItem);
}
private void AddToConnectionsList(Packets.IS_NCN NCN)
{
bool InList = false;

// Check of connection is already in the list
foreach (clsConnection Conn in Connections)
{
if (Conn.UniqueID == NCN.UCID)
{
InList = true;
continue;
}
}



// If not, add it
if (!InList)
{
// Assign values of new connnnection.
clsConnection NewConn = new clsConnection();
NewConn.UniqueID = NCN.UCID;
NewConn.Username = NCN.UName;
NewConn.PlayerName = NCN.PName;
NewConn.IsAdmin = NCN.Admin;
NewConn.Flags = NCN.Flags;

Connections.Add(NewConn);
}
}
private void RemoveFromPlayersList(Packets.IS_PLL PLL)
{
// Copy of item to remove
clsPlayer RemoveItem = new clsPlayer();

// Check what item the player had
foreach (clsPlayer Player in Players)
{
if (PLL.PLID == Player.PlayerID)
{
// Copy item (Can't delete it here)
RemoveItem = Player;
continue;
}
}

// Remove item
Players.Remove(RemoveItem);
}
private bool AddToPlayersList(Packets.IS_NPL NPL)
{
bool InList = false;

// Check if player is already in the list
foreach (clsPlayer Player in Players)
{
if (Player.PlayerID == NPL.PLID)
{
Player.AddedMass = NPL.H_Mass;
Player.CarName = NPL.CName;
Player.Flags = NPL.Flags;
Player.Passengers = NPL.Pass;
Player.Plate = NPL.Plate;
Player.PlayerType = (clsPlayer.enuPType)NPL.PType;
Player.SkinName = NPL.SName;
Player.Tyre_FL = NPL.Tyre_FL;
Player.Tyre_FR = NPL.Tyre_FR;
Player.Tyre_RL = NPL.Tyre_RL;
Player.Tyre_RR = NPL.Tyre_RR;
Player.IntakeRestriction = NPL.H_TRes;
return true;
}
}

// If not, add it
if (!InList)
{
// Assign values of new player.
clsPlayer NewPLayer = new clsPlayer();
NewPLayer.AddedMass = NPL.H_Mass;
NewPLayer.CarName = NPL.CName;
NewPLayer.Flags = NPL.Flags;
NewPLayer.Passengers = NPL.Pass;
NewPLayer.Plate = NPL.Plate;
NewPLayer.PlayerID = NPL.PLID;
NewPLayer.UniqueID = NPL.UCID;
NewPLayer.PlayerName = NPL.PName;
NewPLayer.PlayerType = (clsPlayer.enuPType)NPL.PType;
NewPLayer.SkinName = NPL.SName;
NewPLayer.Tyre_FL = NPL.Tyre_FL;
NewPLayer.Tyre_FR = NPL.Tyre_FR;
NewPLayer.Tyre_RL = NPL.Tyre_RL;
NewPLayer.Tyre_RR = NPL.Tyre_RR;

Players.Add(NewPLayer);
}

return false;
}

// Returns an index value for Connections[] that corresponds with the UniqueID of a connection
public int GetConnIdx(int UNID)
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].UniqueID == UNID) { return i; }
}
return 0;
}

// Returns an index value for Players[] that corresponds with the UniqueID of a player
public int GetPlyIdx(int PLID)
{
for (int i = 0; i < Players.Count; i++)
{
if (Players[i].PlayerID == PLID) { return i; }
}
return 0;
}
#endregion

/**********************************/
/********* PACKET ARRIVAL *********/ // (Uncomment an event in the InitializeInSimEvents method and create the corresponding method down here to enable an other event)
/**********************************/
private void NPL(Packets.IS_NPL NPL)
{
bool LeavesPits = AddToPlayersList(NPL); // Update Players[] list (don't remove this line!)
}

private void NCN(Packets.IS_NCN NCN)
{
AddToConnectionsList(NCN); // Update Connections[] list (don't remove this line!)
}

private void CNL(Packets.IS_CNL CNL)
{
RemoveFromConnectionsList(CNL); // Update Connections[] list (don't remove this line!)
}

private void CPR(Packets.IS_CPR CPR)
{
foreach (clsConnection c in Connections) // Update Connections[] and Players[] list (Don't remove those 2 foreach loops!)
if (c.UniqueID == CPR.UCID)
{
c.PlayerName = CPR.PName;
}

foreach (clsPlayer p in Players)
if (p.UniqueID == CPR.UCID)
{
p.PlayerName = CPR.PName;
p.Plate = CPR.Plate;
}
}

private void PLL(Packets.IS_PLL PLL)
{
RemoveFromPlayersList(PLL); // Update Players[] list (don't remove this line!)
}

private void TOC(Packets.IS_TOC TOC)
{
Players[GetPlyIdx(TOC.OldUCID)].UniqueID = TOC.NewUCID; // Update Players[] list (don't remove this line!)
Players[GetPlyIdx(TOC.OldUCID)].PlayerID = TOC.PLID; // Update Players[] list (don't remove this line!)
}

private void button1_Click(object sender, EventArgs e)
{
InSim.Send_MTC_MessageToConnection("Text", NCN.UCID , 0);
}

}
}

Trekkerfahrer
S3 licensed
Okay, thank you first

this works: InSim.Send_MST_Message....
but i have problems with: InSim.Send_MTC_MessageToConnecton

you said the plid can be 0, and the UCID i should set to NCN.UCID.... now it looks so:

InSim.Send_MTC_MessageToConnection("Text", NCN.UCID , 0);

And i get an error message when i debug it (EDIT: the NCN is blue underlined)

and one question: what is UCID?

thx for help
[Help Needed] First Steps Visual C# and InSim
Trekkerfahrer
S3 licensed
Hi there,

i am not one of the guys who wants to start a cruise server or something else

ok, i want to learn how c# works with insim.

Following i have done:

-Downloaded Visual C# Express and installed it.
-Downloaded the .NET - LFS External library.
-Succesfully opened the sample application and i can succesful connect to InSim.

And now how i want to start:
I want for first a small app, that can send some messages to LFS.

The next thing: A small button menu in LFS, wich are only shortcuts for textmessages like the F1 Key for a "positive smiley" or something else.

This should be for practise only, i know that my wishes have no sense

i would be thankful for every help and good tutorials! i found much code here in the forum and nothing how i activate the action (button or timer... no clue).

MfG

Trekker
Trekkerfahrer
S3 licensed
Quote from _--NZ--_[HUN] :I don't know exactly what do you mean but IMHO XRT is the "tuned" version of XRG and XRR is the "tuned" version of XRT.

i think he means specially only the body with normal road engine and transmission..... in germany we say "fuseltuning" (freely translated: looks more than it haves )
Improve the Chicanes
Trekkerfahrer
S3 licensed
Hi,

i think in live for speed there are not enough race car suitable chicanes and when there is one, you can get through with near full throttle...

now my three cents to the four chicanes i think should be remade...:

the fern bay chicanes: they are too fast i think, both chicanes should be made a bit "longer" that more breaking is needed

westhill: the westhill chicane is a full throttle orgy, so i think the turns on this part of the track should be sharper (and much slower).

last thing is the kyoto gp long chicane off the oval... should be much "longer"... this is the only thing on this track i hate, cause this chicane has no sense (in most cars only one gear down and hope to get through)

what do you think about the chicanes in lfs? i think they can be made a bit more interesting and slower to drive through

sry about my english, i am very tired
Trekkerfahrer
S3 licensed
Okay thank you Victor

The Moderators i want have following Usernames:

carlson74
commandermas
B.R.O
SRR Marty

Thx
Trekkerfahrer
S3 licensed
Hi Victor,

cann you please add a subforum for our league?
Its named: "Digital Racing Series"

The planning is done and the registration is already open. See it youself on our page, links are in my signature. I think as a dutchman you can understand a bit german

Two of our three leagues actually running on following link: http://liga.racing-minds.net/
and they will move for season 2 to the DRS.

Thank you

EDIT: is it possible to have 3 or 4 mods in the subforum?
Open Wheel Challenge Season 1
Trekkerfahrer
S3 licensed
I am glad to announce that the registration to the first season of "Open Wheel Challenge" has opened. When you like to drive all Open Wheelers over 90 minutes, then registrate on following website:

http://www.digital-racing-seri ... nclude.php?path=start.php
Trekkerfahrer
S3 licensed
Quote from Christofire :Have any of you chaps done any multithreaded programming?

I have (and do), and I don't get to choose which cpu/core/etc the thread runs on - you create the thread and leave it to the operating system (in Windows, at least).

this is partially right.
you assign tasks to special cores...

i.e. gothic 3 and cmr dirt: one core is for the game specific things (cars, physics etc.) and the second core streams the landscape.
just watch, there a two tasks open when you start the game.

possible by using command line
Trekkerfahrer
S3 licensed
Quote from ajp71 :I'd consider those cockpit views

In the new patch there were some settings added to adjust the cockpit view (rather than having to use a custom cam) have you tried seeing whether you can recreate your custom view in the in-car view?

hmmmm, i tried it... it comes near to my views.... the only thing i cannot make is the height of my head

did not thought about, i just only copied my custom views from x to y ^^

open wheeler i have problems cause i cant see the mirrors with my favourite fov
Trekkerfahrer
S3 licensed
Quote from Mazz4200 :.
I'm not sure what your disability is but i'm sure you're aware in life you have to accept what you've been given and simply adapt to any and even situation you may find yourself in. Also you'll be aware that a little bit of creative technology can completely transform the lives of those with disabilities. But you must understand that for people with disabilities there are certain things that you simply can't do, no matter how much you may want it. I personally don't think it's fair to limit anyone anything simply on the premise that someone with a disability can't do it. Therefore forced cockpit view should be used, but only as a serverside option (as it is now)

Post a screen shot of the view you use and we'll have a look at it and see if we can help you come up with something similar in cockpit view.

in real life you have at first TWO eyes.... a computer only a narrow view.... even one or two widescreens will not have such a point of view you have in reallife
what my disability is? simple... i can´t look to the right side and i have a tunnel view (only the object i fix on i can see sharp)

here are my views and i think they are cockpit views as well, one gtr view i use for all closed cars and one i use for open wheelers
Trekkerfahrer
S3 licensed
Quote from Nobo :TBH, i prefere to have one game for everyone which everyone can drive, which should be the same on all servers. And not this server has that restriction and that server has other restrictions.
Well i dont see why we should split up the racers like that.
The white there, the yellow there, and the black sheeps (chase view drivers) are not allowed to get in here. Or only wheel drivers or whatever.
Not dozen options for every server, taking ages to find the right one.
(dont we all like lFS for its great physics AND the simple online mode???)

Either force it in the game for everyone, so every servers runs the same or just leave it as it is. You wont see me crying when it gets forced for everyone globally by lfs. But as i stated in my previous post cockpit view is missing sth to the "real feel", thats why i dont use it....maybe yet

thx aldi, i couldn´t say it better

lfs is only a game.... and making too much restriction.... specially the forced cockpit view will make two camps of lfs drivers... after that maybe the community has no unity... this would be a desaster for us all.

i personally like more to see from the track, but my cockpit is visible.
and think of handicapped drivers like me or some others i met over one year of lfs... i know someone out there has only one arm... and he drives with custom view
Trekkerfahrer
S3 licensed
i am not driving with a chase cam..... i have modified cockpit views.... as example: i drive with a cam on bf1 wich is similar to the tv cockpit view
gtrs and other road cars i have a slightly modified cockpit view. its a bit higher and a bit more to the right side (i drive left handed).
when you say only cockpit, i have to leave lfs, cause it would be dangerous to all of you if i have to drive with forced cokpit view....

and simulation or not.... lfs is at the end only a game
Trekkerfahrer
S3 licensed
i am eye handicapped.... i need a custom view.... othoerwise i cannot see distances correctly
Forced Cockpit View
Trekkerfahrer
S3 licensed
Hi,

the forced cokpit view is something i don`t like in lfs... several servers has turned it on and i don´t know why....
i have a handicap with my eyes so i have to make my own view to see most as possible.
i saw that a couple of leagues made this as duty so these leagues are no option for me.
now i want to request the devs to delete this option, cause i think there are some other handicapped racers out there.
Trekkerfahrer
S3 licensed
okay, the new patch has negatives and positives....

one negative on my list is the clutch... it gets toasted when i try new sets and its gearing
but a screw here and a screw there and i can live with it and i have only one millimeter orange
@drifters: zero to clutch preload and all works fine

to the positives: the new gearbox simulation is now better for my driving style so i have a much faster feeling with the new patch...
the most important improved thing is the updated blackwood track, the new chicane and the section after the backstraight is much better than before.
Trekkerfahrer
S3 licensed
Merry Christmas to the Devs,

Have a nice Christmas Time and a happy and healthy new year

The same goes to the whole LFS Community, you all are great!
Trekkerfahrer
S3 licensed
my two cents: the game is very good, and every cent you spend is good for scawens work...
and the demo racers: please buy S2 and support scawen! and the other thing is: you get the lx6 and THIS is the best drift car out there
Trekkerfahrer
S3 licensed
Team creative.Lightning Racing FBM Skin:
Trekkerfahrer
S3 licensed
the netcode has its basic functions like all other multiplayer games....

it collects the coordinates, pitch, yaw and roll... EDIT: and "maybe routes" if there is a packet loss (often seen if a car runs straight ahead and in the next second he finally drove around the corner )

how the physics etc are implented, don't know and i think its scawens secret
Last edited by Trekkerfahrer, .
Trekkerfahrer
S3 licensed
time to fly and i managed it ^^
Trekkerfahrer
S3 licensed
now we have the problem why i left conterstrike.... the old question: is he cheating or not?
in this special wr i think its a cheat.... 50% fuel and this time? never and ever!!!

cheaters go to hell
Trekkerfahrer
S3 licensed
on this server there are bad admins i think.... everytime when you have an accident and its a fault by a FM racer, you get banned because they make their own rules....
especially "failure" (the name fits ) is unable to admin a server....
i have a lifetime ban because of his complete inability to analyze an incident....

my tip: simply don´t drive there, there are so much oval servers out and most of them makes more fun ^^
Trekkerfahrer
S3 licensed
my personal opinion is:

naming the cheaters (lfsw) inclusively a demo/replay and put him/her on a public accessable blacklist...
should be a work for our very good programmers of third party tools to do something linke steambans.... my work will begin now ^^... lets see who does it better
FGED GREDG RDFGDR GSFDG