Well, now insim show me car contacts but after 5- 10 minutes after insim start. And when a player change the name insim don't update the name, just keep same name.
Any help please ? Does anyone have this problem too, or something like that ?
I renamed var PlayerA = _players[CON.A.PLID].PName; and var PlayerB = _players[CON.B.PLID].PName; to var PlayerA = _players[CON.A.PLID]; and var PlayerB = _players[CON.B.PLID]; to see what returns but insim don't send the message
Good morning... i have this code but i have some errors:
private void MCI_CarInformation(InSim insim, IS_MCI MCI) { try { int idx = 0; for (int i = 0; i < MCI.NumC; i++) { idx = GetConnIdx2(MCI.Info[i].PLID); //They aren't structures so you cant serialize! Connections[idx].compcar.AngVel = MCI.Info[i].AngVel; Connections[idx].compcar.Direction = MCI.Info[i].Direction; Connections[idx].compcar.Heading = MCI.Info[i].Heading; Connections[idx].compcar.Info = MCI.Info[i].Info; Connections[idx].compcar.Lap = MCI.Info[i].Lap; Connections[idx].compcar.Node = MCI.Info[i].Node; Connections[idx].compcar.PLID = MCI.Info[i].PLID; Connections[idx].compcar.Position = MCI.Info[i].Position; Connections[idx].compcar.Speed = MCI.Info[i].Speed; Connections[idx].compcar.X = MCI.Info[i].X; Connections[idx].compcar.Y = MCI.Info[i].Y; Connections[idx].compcar.Z = MCI.Info[i].Z; } for (int i = 0; i < MCI.NumC; i++) //We want everyone to update before checking them. { MCI_Update(MCI.Info[i].PLID); } } catch { } }
This "MCI_Update(MCI.Info[i].PLID);" is for using heawy's reply (https://www.lfs.net/forum/thread/88537) but i have 5 errors at Direction, Heading, Lap, Node and Speed :|
The error is: Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?)
I tried to rename ushort to int (0 errors but the code don't work)
EDIT: here is compcar
public struct CarPack { public short AngVel; public ushort Direction; public ushort Heading; public CompCarFlags Info; public ushort Lap; public ushort Node; public ushort Speed; public byte PLID; public byte Position; public int X; public int Y; public int Z; }