Hello guys, when i cross the finish line the hosts sends a message which says that host cross it, not me...
Here is my code, any ideas how to fix it?
EDIT: Found the problem - Had to use GetConnIdx2!
Here is my code, any ideas how to fix it?
private void LAP_PlayerLap(InSim insim, IS_LAP LAP)
{
var Conn = Connections[GetConnIdx(LAP.PLID)];
//this isn't working
if (Conn.CurrentLapDrift <= 300)
{
MsgPly("^6> ^7This lap won't be saved.", Conn.UniqueID);
Conn.CurrentLapDrift = 0;
Conn.CurrentDrift = 0;
}
else
{
MsgAll("^6> " + Conn.PlayerName + " ^7made ^1" + Conn.CurrentLapDrift + " points ^7in a lap.");
Conn.CurrentLapDrift = 0;
Conn.CurrentDrift = 0;
}
//only this works
insim.Send (Connections[GetConnIdx(LAP.PLID)].PlayerName + " !");
}
EDIT: Found the problem - Had to use GetConnIdx2!