The online racing simulator
Searching in All forums
(81 results)
jobans
Demo licensed
Quote from ADr3nAl1n :I don't know how it is on LsC Insim I never had that. I can't just guess

My LFS_External file version is 1.1.0.0. Do I need to just replace that file or do something else? Please tell me
jobans
Demo licensed
ADr3nAl1n Can you tell me how did you updated library?
jobans
Demo licensed
Well how to update library?

EDIT: I replaced dll file in bin folder, then builded solution. InSim turns on but a lot of things dont work.
Last edited by jobans, .
jobans
Demo licensed
ok, how can I fix my LsC InSim?
jobans
Demo licensed
I have LsC InSim.
jobans
Demo licensed
Thanks for helping. Could you tell me how to update InSim to work on 0.6E?
jobans
Demo licensed
Yeah I would like to know where can I limit them too. Tell me what I need to look for.
jobans
Demo licensed
Quote from Dygear :Limit the amount of packets your sending in a single go.

You mean /pps=X command right?
jobans
Demo licensed
SO it means no InSims anymore?
jobans
Demo licensed
Anyone can help?
jobans
Demo licensed
Quote from cargame.nl :Well, is the InSim running locally or not?

Yes its running locally
jobans
Demo licensed
Any idead how to fix that? Because on 0.6B there wasnt that kind of problem.
Cruise InSim problem 0.6E
jobans
Demo licensed
Hello everyone I got some problems with my Cruise since 0.6E was released. Before InSim worked perfectly, but now it shuts off after some hours. Noticed some errors in dedicated - Before it shuts off it says Insim Timeout TCP-Cruise and before it gives me lines:

Dec 23 16:09:49 TCP ERROR : INSIM LIMIT
Dec 23 16:09:49 TCP ERROR : WOULDBLOCK
Dec 23 16:09:49 TCP ERROR : INSIM LIMIT
Dec 23 16:09:49 TCP ERROR : WOULDBLOCK


Anyone can help to explain me whats wrong and how to fix it? Thanks
jobans
Demo licensed
Anything wrong here? Atleast I couldn`t find that anything is wrong there. Really need help with this one and I would be grateful if you all will be more interested in my problem.
Last edited by jobans, .
Cnl
jobans
Demo licensed
Here is my CNL code.


<?php 
// A client left the server.
        
private void CNL_ClientLeavesHost(Packets.IS_CNL CNL)
        {
            try
            {
                
clsConnection Conn Connections[GetConnIdx(CNL.UCID)];
                
clsConnection Conn2 Connections[GetConnIdx(Connections[CNL.UCID].Chasee)];

                
MsgAll("^6»^7 " Conn.PlayerName " ^7(" Conn.Username ") disconnected.");

                
#region ' Robbery Goes to PITS '
                
if (Conn.UniqueID == RobberUCID && RobInChase == 1)
                {
                    
Conn.RobTimerActiv 0;
                    
MsgAll("^6»^7 " Conn.PlayerName " ^7was fined ^1$" RobCash);
                    
MsgAll("^6»^7 REASON: Escaping from the police!");
                    
Conn.Cash -= RobCash;
                    
RobTimers 0;
                    
BankTimer.Enabled false;
                    
BankTimer.Stop();
                    
RobInChase 0;
                    
IsRobbable false;
                    
RobberUCID = -1;
                }
                
#endregion

                #region ' Specting whilst suspect being Chased '
                
if (Conn.Chasee != -1)
                {
                    
MsgAll("^6»^7 " Conn.PlayerName "^7 lost " Conn2.PlayerName "^7!");
                    if (
Conn.IsCadet == 1)
                    {
                        
MsgAll("^6»^7 " Conn.PlayerName " was fined ^1$300");
                        
MsgAll("^6»^7 Reason: Losing the chase on Track!");
                        
Conn.Cash -= 300;
                    }
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN19Conn.UniqueID);
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN20Conn.UniqueID);
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN20Conn2.UniqueID);
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN21Conn.UniqueID);
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN22Conn.UniqueID);
                    
#region ' Check UCID '
                    
foreach (clsConnection C in Connections)
                    {
                        if (
C.Chasee == Conn.UniqueID)
                        {
                            
C.Chasee = -1;
                            
C.ChaseePlayerName "";
                            
C.ChaseeUsername "";
                            
C.Busted 0;
                            
C.ChaseCondition 0;
                            
C.CTimer 0;
                            
C.InChaseOrNot 0;
                        }
                        if (
C.Username == Conn.JoinedBackupUsername)
                        {
                            
C.BackupCallerUsername "";
                        }
                        if (
C.Username == Conn.BackupCallerUsername)
                        {
                            
C.JoinedBackupUsername "";
                        }
                    }
                    
#endregion
                    
Conn2.IsBeingChased 0;
                    
Conn.InChaseOrNot 0;
                    
Conn.ChaseePlayerName "";
                    
Conn.ChaseeUsername "";
                    
Conn.Chasee = -1;
                    
Conn.ChaseCondition 0;
                    
Conn.JoinChase 0;
                    
Conn.CTimer 0;
                    
SirenShutsOff();
                }
                
#endregion

                #region ' Suspect Spected whilst being Chased '
                
if (Conn.IsBeingChased == 1)
                {
                    
MsgAll("^6»^7  " Conn.PlayerName " ^7was fined ^1$700");
                    
MsgAll("^6»^7 Reason: Leaving as Suspect whilsts Being chased!");
                    
Conn.Cash -= 700;
                    
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN20Conn.UniqueID);
                    foreach (
clsConnection C in Connections)
                    {
                        if (
C.Chasee == Conn.UniqueID)
                        {
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN19C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN20C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN21C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN22C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN23C.UniqueID);
                            
C.Chasee = -1;
                            
C.ChaseeUsername "";
                            
C.ChaseePlayerName "";
                            
C.ChaseCondition 0;
                            
C.InChaseOrNot 0;
                            
C.JoinChase 0;
                            
C.CTimer 0;
                        }
                    }
                    
Conn.IsBeingChased 0;
                    
SirenShutsOff();
                }
                
#endregion

                #region ' Busted Ran Away '
                
if (Conn.BustedRanAway == 1)
                {
                    foreach (
clsConnection C in Connections)
                    {
                        if (
C.Username == Conn.OfficerUsername)
                        {
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN39C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN40C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN41C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN42C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN43C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN44C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN45C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN46C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN47C.UniqueID);
                            
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN48C.UniqueID);
                            
C.OpenBustedBox 0;
                            
C.BustedUsername "";
                            if (
C.Chasee != -1)
                            {
                                if (
C.Chasee == Conn.UniqueID)
                                {
                                    
Conn.Chasee = -1;
                                    
Conn.ChaseCondition 0;
                                }
                            }
                        }
                    }
                    if (
Conn.AcceptFines == 1)
                    {
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN39Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN40Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN41Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN42Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN43Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN44Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN45Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN46Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN47Conn.UniqueID);
                        
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN48Conn.UniqueID);
                        
Conn.AcceptFines 0;
                    }
                    
MsgAll("^6»^7 " Conn.PlayerName " ^7runs away but fined ^1$1800");
                    
Conn.OfficerUsername "";
                    
Conn.Cash -= 1800;
                    
Conn.BustedRanAway 0;
                }
                
#endregion

                #region ' Account Reset Issue '
                
if (AccountReset == false)
                {
                    foreach (
clsConnection C in Connections)
                    {
                        if (
C.FailCon == 0)
                        {
                            
FileInfo.UpdateUserLeave(C);
                        }
                    }
                }
                if (
AccountReset == true)
                {
                    
AccountReset false;
                }
                
#endregion

                
RemoveFromConnectionsList(CNL.UCID);        // Update Connections[] list

            
}
            catch { }
        }
?>

jobans
Demo licensed
Sorry for triple post. Now I realised that the InSim doesnt delete players from playerlist when player disconnects. WHen in server there are 8 connections and I write !reinit command which I added to this cruise from my old InSim it shows that there are more in my case it showed 38 connections.
Last edited by jobans, .
jobans
Demo licensed
Anyone can help?
Need some help with Cruise InSim.
jobans
Demo licensed
Hello. I found the Open Source cruise insim which is downloadable in this forum. Original thread for that cruise http://www.lfsforum.net/showthread.php?p=1683389 I fixed the most bugs and finished commands etc. But there is one big problem which I cant fix. Sometimes when somone connects it connects like other player in server and got all his stats from user file. There is also that bug that for example Johny (player1) writes !showoff but in chat log it shows that Johny (player2) has these stats and it shows even the players which are disconnected a while ago. Anyone can help me with that? Im thinking about packet that it doesnt works right and that when player disconnect it doesnt delete him from player list. Hope someone can help me
jobans
Demo licensed
Still waiting for help.
jobans
Demo licensed
Sorry for this late answer but I only now got time to test it. So I have a little progressive news. Good is that when I changed GetConnIdx to GetPlyIdx my cop system sometimes works. Before when there was more than 8 connections it didnt work at all, but now it sometimes works for some cops and they can catch only some chosen civilians. And another bug is that when there are atleast 2 cops On DUTY, ok I will tell it like this - COP1 is chasing MrX, he busts him but the system shows that COP2 is arrested him. Hope you got that . So what could be problem for that?
jobans
Demo licensed
Well this is my CompCar code if that what you wanted.

Quote :// Detailed car information packet (max 8 per packet)
private void MCI_CarInformation(Packets.IS_MCI MCI)
{
try
{
//CompCar is the CompCar packet structure I added to clsPlayer
int idx = 0;

for (int i = 0; i < MCI.NumC; i++)
{

idx = GetConnIdx(MCI.Info[i].PLID); //They aren't structures so you cant serialize!
Players[idx].CompCar.AngVel = MCI.Info[i].AngVel;
Players[idx].CompCar.Direction = MCI.Info[i].Direction;
Players[idx].CompCar.Heading = MCI.Info[i].Heading;
Players[idx].CompCar.Info = MCI.Info[i].Info;
Players[idx].CompCar.Lap = MCI.Info[i].Lap;
Players[idx].CompCar.Node = MCI.Info[i].Node;
Players[idx].CompCar.PLID = MCI.Info[i].PLID;
Players[idx].CompCar.Position = MCI.Info[i].Position;
Players[idx].CompCar.Speed = MCI.Info[i].Speed;
Players[idx].CompCar.X = MCI.Info[i].X;
Players[idx].CompCar.Y = MCI.Info[i].Y;
Players[idx].CompCar.Z = MCI.Info[i].Z;
decimal SpeedMS = (decimal) (((MCI.Info[i].Speed / 32768f) * 100f) / 2);

decimal Speed = (decimal)((MCI.Info[i].Speed * (100f / 32768f)) * 3.6f);
decimal ConvSpeed = (decimal)(Speed * 25 / 1000);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance += Convert.ToInt32(SpeedMS);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].DistanceSincePit += Convert.ToInt32(SpeedMS);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].LicenseDistance += Convert.ToInt32(SpeedMS);
//Connections[idx].DistanceSincePit += Convert.ToInt32(SpeedMS1);
Connections[idx].TotalDistance += Convert.ToInt32(SpeedMS);
Players[GetPlyIdx(MCI.Info[i].PLID)].Payout += ConvSpeed;


}
for (int i = 0; i < MCI.NumC; i++) //We want everyone to update before checking them.
{
MCI_Update(MCI.Info[i].PLID);

}

jobans
Demo licensed
In total I have 26 errors. Eror is showing this line for (int i = 0; i < MCI.CountC; i++). It shows error because its not defined but I dont know where I need to define it.
jobans
Demo licensed
So I tried what broken write to me. In my case I dont have a code line for (int i = 0; i < Players.Count; i++) only in GetPlyIdx. Then I found that instead of for (int i = 0; i < Players.Count; i++) I have for (byte i = 0; i < MCI.NumC; i++). I tried to replace them with for (int i = 0; i < MCI.CountC; i++) but I got errors in all places where I replaced them. Error what I get is down there. Any Idea how to fix that? And what does those NumC mean?

Error 20 'LFS_External.Packets.IS_MCI' does not contain a definition for 'CountC' and no extension method 'CountC' accepting a first argument of type 'LFS_External.Packets.IS_MCI' could be found (are you missing a using directive or an assembly reference?)

jobans
Demo licensed
Any idea how to fix that?
jobans
Demo licensed
It is PoVo leaked cruise. I repaired the cop system but now im got that it starts to buf when there is more than 8 players. So that means that there are some problems with MCI packets but I dont know what exactly.
FGED GREDG RDFGDR GSFDG