The online racing simulator
Searching in All forums
(13 results)
WildGamerz
S3 licensed
Quote from Flame CZE :Is there a reason you use InSim Relay to communicate with your server? If you...

oh didnt know that insim can used for connecting to hosts as well i thought it was only for local program lmao
Shrug
okay so after trying that as well i get this response


Unhandled Exception: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Insimipiremoved
at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
at InSimDotNet.TcpSocket.Connect(String host, Int32 port)
at InSimDotNet.InSim.Initialize(InSimSettings settings)
at Program.Main(String[] args) in E:\INSIM FOLDERS(ALL)\Insimapplications\Insim Relay\Program.cs:line 63
WildGamerz
S3 licensed
Quote from Flame CZE :How do you test that it doesn't work? I see you're sending an IS_MTC packet...

yeah i didn't notice that i have put admin pass in IR_REL instead of IS_ISI packet so i got confused there IS_MTC packet works now thanks again
WildGamerz
S3 licensed
Quote from rane_nbg :Can you please say what you did to solve the issue? It's very valueable for others whom may have similair problem.

Sure! glad to help others so that they dont suffer Smile i think this code only works if you got insim.net lib 2.3.3 or latest one in https://github.com/alexmcbride/insimdotnet/tree/master

using System;
using InSimDotNet;
using InSimDotNet.Packets;
using InSimDotNet.Helpers;

class Program
{
static void Main(string[] args)
{
InSim insim = new InSim();

// Bind the MSO packet handler
insim.Bind<IS_MSO>(MessageMSO);
insim.Bind<IR_HOS>(HostList);

// Initialize InSim relay
insim.Initialize(new InSimSettings {
IsRelayHost = true,
});

// Send host select packet
insim.Send(new IR_HLR { ReqI = 1 });
insim.Send(new IR_SEL {
HName = "Hostname", // Host to select
Admin = "Passwprd", // Optional admin pass
Spec = String.Empty // Optional spectator pass
});
insim.Send(new IS_TINY { ReqI = 1, SubT = TinyType.TINY_NCN,});
insim.Send(new IS_MTC {UCID= 255, ReqI = 3, Msg = "This is Testing"});

Console.WriteLine("Connected to relay. Press any key to exit.");
Console.ReadKey();
}

static void HostList(InSim insim, IR_HOS hos) {
// Loop through each host connected to the server and print out some details
foreach (HInfo info in hos.Info) {
Console.WriteLine(
"{0} ({1} / {2})",
StringHelper.StripColors(info.HName),
info.Track,
info.NumConns);
}
}

// MSO message handler
static void MessageMSO(InSim insim, IS_MSO packet)
{
Console.WriteLine($"[{packet.UCID}] {packet.Msg}");
}
}

WildGamerz
S3 licensed
Quote from Flame CZE :How do you test that it doesn't work? I see you're sending an IS_MTC packet...

Thanks for all the helps guys solved it got a few questions as well the insim relay only works in 2.3.3 InsimDotNet lib from nuget
anything above that version doesnt kris did told me that to use .NET core instead of .NET framework is that true? just asking Smile

1 more thing if im connected to insim relay how can i create commands if Prefix field is ignored when Isrelayhost = true; in insimdotnet lib tho
Last edited by WildGamerz, .
WildGamerz
S3 licensed
Quote from kristofferandersen :Ah yes. You're using the wrong packet if you're trying to request a list of...

so again i tired but still couldn't do it

using System;
using InSimDotNet;
using InSimDotNet.Packets;

class Program
{
static void Main(string[] args)
{
InSim insim = new InSim();

// Bind the MSO packet handler
insim.Bind<IS_MSO>(MessageMSO);

// Initialize InSim relay
insim.Initialize(new InSimSettings {
IsRelayHost = true,
Admin = "",
Host = "isrelay.lfs.net",
Port = 47474
});

// Send host select packet
insim.Send(new IR_HLR { ReqI = 1 });
insim.Send(new IR_SEL { HName = "Hostname" });
insim.Send(new IS_MTC{UCID = 255, Msg = "This is Testing"});

Console.WriteLine("Connected to relay. Press any key to exit.");
Console.ReadKey();
}

// MSO message handler
static void MessageMSO(InSim insim, IS_MSO packet)
{
Console.WriteLine($"[{packet.UCID}] {packet.Msg}");
}
}

WildGamerz
S3 licensed
i have done exactly like you told still not results correct me if im wrong which im proby am Smile
using System;
using InSimDotNet;
using InSimDotNet.Packets;
using InSimDotNet.Helpers;

class Program {
static void Main() {
InSim insim = new InSim();

// Bind handler for HOS (host list) packet.
insim.Bind<IR_HOS>(HostList);

// Initialize connection to InSim Relay
insim.Initialize(new InSimSettings {
Host = "isrelay.lfs.net", // Relay host
Port = 47474, // Default relay port
IsRelayHost = true,
Admin = "", // Not needed for relay
IName = "HostLister" // Name of this client
});

// Request host list.
insim.Send(new IR_HLR { ReqI = 1 });

Console.WriteLine("Requesting host list from InSim Relay...");
Console.ReadLine();
}

static void HostList(InSim insim, IR_HOS hos) {
if (hos.NumHosts == 0) {
Console.WriteLine("No hosts found.");
return;
}

Console.WriteLine("Found {0} host(s):", hos.NumHosts);
foreach (HInfo info in hos.Info) {
Console.WriteLine(
"{0} ({1} / {2} connections)",
StringHelper.StripColors(info.HName),
info.Track,
info.NumConns);
}
}
}

InSim Relay request(Solved)
WildGamerz
S3 licensed
so im using lib from https://github.com/alexmcbride/insimdotnet i followed his exact code from his github wiki but i go no results.
when i run this i get no host list or it doesnt even connect to any host i tired every way possible i know
please correct me if im wrong..

using System;
using System.IO;
using InSimDotNet;
using InSimDotNet.Packets;
using InSimDotNet.Helpers;

namespace LFSInSimRelay
{
class Program
{
// File to log messages to
private static readonly string LogFile = "mso_log.txt";

static void Main(string[] args)
{
Console.WriteLine("Starting LFS InSim Relay...");

InSim insim = new InSim();

// Bind event handlers
insim.Bind<IS_NCN>(NewConnection);
insim.Bind<IS_MSO>(MessageOut); // Add MSO event handler

// Initialize InSim relay
insim.Initialize(new InSimSettings {
IsRelayHost = true
});

Console.WriteLine("InSim relay initialized.");
Console.WriteLine("Selecting host:");

// Select a host
insim.Send(new IR_SEL {
HName = "", // Host to select
Admin = "", // Optional admin pass
Spec = String.Empty // Optional spectator pass
});

Console.WriteLine("Requesting current connection list...");

// Request connection list
insim.Send(new IS_TINY {
ReqI = 1,
SubT = TinyType.TINY_NCN,
});

Console.WriteLine("Monitoring for new connections and MSO messages.");
Console.WriteLine("Press Enter to exit.");
Console.ReadLine();

// Clean up
insim.Disconnect();
}

static void NewConnection(InSim insim, IS_NCN ncn)
{
// Output name of each player connected to the host
Console.WriteLine("Player connected: {0}", StringHelper.StripColors(ncn.PName));
}

static void MessageOut(InSim insim, IS_MSO mso)
{
// Strip color codes from message
string cleanMessage = StringHelper.StripColors(mso.Msg);

// Format the message with user info when available
string logMessage;
if (mso.UCID > 0)
{
// Message from a user
logMessage = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] [USER:{mso.UCID}] {cleanMessage}";
}
else
{
// System message
logMessage = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] [SYSTEM] {cleanMessage}";
}

// Output to console
Console.WriteLine(logMessage);

// Log to file
try
{
File.AppendAllText(LogFile, logMessage + Environment.NewLine);
}
catch (Exception ex)
{
Console.WriteLine($"Error writing to log file: {ex.Message}");
}
}
}
}

TC Helper Premium for [TC] CityDriving
WildGamerz
S3 licensed
# TC Helper Premium

## Product Overview
TC Helper Premium is your ultimate racing companion, offering an enhanced experience with exclusive features designed to elevate your racing performance. Building upon our free version's foundation, Premium unlocks a comprehensive suite of advanced tools.

## Premium Features
* Advanced Lap Timer: Track your performance with precision timing,and detailed Laptime table
* Multi-Language Support: Translate language from ENG to other languages
* Cruise Driving: Maintain consistent speeds with automatic acceleration
* Radar System: Get real-time awareness of surrounding vehicles
* Smart Player Tracking: Monitor any player's position without additional requirements
* Contact Detection: Receive instant notifications for collisions and interactions
* Friend Stats Dashboard: Track up to 25 friends' racing statistics in real-time
* Trip System: Track your trip using our detailed statistics in real time
* Requestmod: save and request your fav mod anytime!!
and much more explained in dms

## Premium Benefits
* Exclusive access to all future premium features
* Priority customer support

## How to Get Started
1. Download and run TC Helper Premium
2. Enter your LFS ID when prompted
3. Save your hardware ID
4. Contact wildgamerz on Discord with your hardware ID
5. Receive your premium activation

## Pricing
* 20k TC Cash
## NO Refunds

## Support
Join our Discord community for support, updates, and racing discussions:
Discord Server: https://discord.gg/uMnGD33qZT

##Credits
Big Thanks to Whatalife for helping make this app possible


## Demo


---
TC Helper Premium - Enhance Your Racing Experience
Last edited by WildGamerz, .
WildGamerz
S3 licensed
Quote from WildGamerz :Does it work in insimdotnet? lib

SO no?
WildGamerz
S3 licensed
Keep in mind this is just a free version There is also premium version available
Features for Premium Version:
Cruisecontrol HUD(Screenshot below)
Busguide
Upgraded UI
able to monitor your friend's stats Max : 25
if you want to ignore certain name put # at the start of the name it will ignore that name

Discord ID;
WildGamerz
Last edited by WildGamerz, .
WildGamerz
S3 licensed
Does it work in insimdotnet? lib
WildGamerz
S3 licensed
Thanks!
LCSLazy
WildGamerz
S3 licensed
A insim app i been working on past 4months it for LCS cruise server only.

Features:
--------------------------------------------------------------------------
Below image you can see the Stats
1.OnlineTime
2.TotalFines
3.Money Gained
4.Driven Kms
5.Delivery Done
6.Chase Distance
7.Chase time
8.Warehouse
9.Delivery GPS

1.OnlineTime - Shows you how much time you been online in that server.
2.TotalFines - Shows how much fines you have gotten in LCS server.
3.Money Gained - shows how much money you have gained by doing delivery jobs.
4.Driven Kms - Shows you how much kms you have driven today.
5.Delivery Done - Shows you how many delivery jobs you have done today
6.Chase Distance - Records your chase distance.
7.Chase time - Shows you how long the chase has been going on.
8.Warehouse - A small button placed top it indicates that there is warehouse when click on that button it will open up a menu containing server info rules how to do delivery etc
9.Delivery GPS - A small marker will appear on your screen when you picked a package indicating that you have to go there.
--------------------------------------------------------------------------
Place LCSlazy in LFS/Folder then do /insim 29999 in LFS and open LCSlazy.exe

Here the Link to LCSlazy.
https://www.mediafire.com/file ... xq02/LCSlazyV2.1.zip/file
Last edited by WildGamerz, .
FGED GREDG RDFGDR GSFDG