The online racing simulator
Searching in All forums
(81 results)
jobans
Demo licensed
Anyone?
jobans
Demo licensed
I made something like this:
double test = Math.Atan2(Conn.CompCar.Y - (-90), Conn.CompCar.X - (-211)) * 180 / 3.1415 + 180; // -90 = Destination Y and -211 = Destination X

double test2 = Conn.CompCar.Heading + 90;
InSim.Send_BTN_CreateButton("^1" + (test - test2), Flags.ButtonStyles.ISB_DARK, 4, 25, 40, 60, 51, C.UniqueID, 2, false);

Is anything of it right? Really confused about all this :/
jobans
Demo licensed
Thank you very much. Veru nice job! Could you please explain how to get V.y and V.x ?
Quote :Use atan2(V.y, V.x) to get Alpha (in radians and in <-PI/2; PI/2) range)

From your answer I understood that V is heading which I can take from MCI packet (or I`m wrong? ) Does Heading splits definition for Heading.X and Heading.Y ?
Last edited by jobans, .
jobans
Demo licensed
that -90 and -211 is corrdinate to a place which I want it to show. Can you please explain what does this do? And what to do next? Waiting for help :/

Sorry for double post.
jobans
Demo licensed
Well I did this
double test = Math.Atan2(Conn.CompCar.Y - (-90), Conn.CompCar.X - (-211)) * 180 / 3.1415 + 180;

Not sure what does it give to me and no idea what to do next.
jobans
Demo licensed
what is atan2?
jobans
Demo licensed
Nice pic
How can I calculate angle of destination?
jobans
Demo licensed
Thanks, but it works only on distance. I want something like a panel which shows direction of that place. Like this

X X X
X .. >
X X X
Direction/Vectors.
jobans
Demo licensed
Hello. I was wondering hwo to make something like vector in LFS? I want to make gps for my cruise InSim That shows the direction to one place. I was thought I could use Heading or X and Y to make one but I have no idea how. Hope you can help.
Thanks
Last edited by jobans, .
jobans
Demo licensed
Too lazy to rewrite all parts There is no other way to get new packets to LFS_External?
LFS_External to InSimDotNet
jobans
Demo licensed
Hello (Again me :nod I got my cruise with Lfs_External library and I was wondering how can I change this to InSimDotNet? I need this because LFS_External isnt updating since a long time. I already done this part which is wrote here https://www.lfsforum.net/showthread.php?t=68564 I have those all dll and other InSimDotNet files in my cruise folder installed. I tried to disable in my insim this part
using LFS_External;
using LFS_External.InSim;

and replaced that with
using InSimDotNet;
using InSimDotNet.Packets;

But then I got a lot of errors. How is this possible to udpate it properly? Actually all I need is the new packets which are released since 0.6B version. Maybe I dont need to replace all librar and I can just add it to take packets from InSimDotNet? Help me please

Thanks.
jobans
Demo licensed
Thanks got it to work :*
jobans
Demo licensed
Nothing happens even if I remove that statement. What coutldt bet wrong with that flag? How to add it correctly?
jobans
Demo licensed
Thanks, finally I can try to make something, but got problem, again

// Car Contact
private void CON_CarContact(Packets.IS_CON CON)
{
try
{

if (Connections[GetConnIdx2(CON.A.PLID)].Cash > 0)
{
MsgAll("^6»^7 Contact detected");



}
}


catch { }
}

I put this code but when I do 2 car contact I dont get that message, Im using these variables only for testing, Can anyone tell whats the problem?
jobans
Demo licensed
Still waiting for help :/
jobans
Demo licensed
It need to be able to mute specific player, because it "mutes" player when he write command, all I need is that code where that happens
jobans
Demo licensed
I thought about something like this:
if (StrMsg.Length > 0 && Conn.Mute == 1)
{
InSim.Send_MTC_MessageToConnection("^1You are MUTED", (MSO.UCID), 0);
}

But how to make it to dont show this message in chat?
Making MUTE in cruise
jobans
Demo licensed
I was wondering is it possible to make mute in cruise insim? I have tried a few things but sadly without success. Could you tell me how does InSim blocks commands messages which starts with ! I tried to find that in my source but no succeed.

Thanks for help
jobans
Demo licensed
Thanks I got it updated
But now I have anothe problem. How can make it to for example write in chat those two cars who were in contact?
I got somethong like this so far but I dont know how to continue
private void CON_CarContact(Packets.IS_CON CON)
{
try
{
foreach (clsConnection C in Connections)
{
if ()
{

}
}
}
catch { }
}

jobans
Demo licensed
And where can I get it?
jobans
Demo licensed
And how to add that packet to lfs_external?
Initialize InSim Events
jobans
Demo licensed
Hello, I started working with my InSim again and I was wondering about all insim events that are available to use. I`d like to make InSim recognize 2 car contact. The problem is I dont know how to make it. For example I got events like this
InSim.CPR_Received += new LFS_External.InSim.InSimInterface.CPR_EventHandler(CPR_ClientRenames); // A client changed name or plate.

But what I need to write so that InSim reads 2 car contact? And how to make it to show which cars were involved? And maybe there are many more? If yes where can I find them all?

Thanks for help
Connection Ip to InSim
jobans
Demo licensed
Hello. I was wondering is it possible to get ip to cruise InSim who connected to server? For example I write command !UserIP S2 and it shows his ip.

Thanks
jobans
Demo licensed
- Fun
- Friends
- Trolling around
- G27 racing wheel
- Best race simulator
jobans
Demo licensed
Still waiting for help :/
FGED GREDG RDFGDR GSFDG