Example #1
0
        protected override void OnCollision(IncidentInfo incident)
        {
            if (this.BroadcastIncidents > 0)
            {
                DriverInfo driver = this.PluginManager.GetDriverByConnectionId(incident.ConnectionId1);

                if (incident.Type == (byte)ACSProtocol.MessageType.ACSP_CE_COLLISION_WITH_CAR)
                {
                    DriverInfo driver2 = this.PluginManager.GetDriverByConnectionId(incident.ConnectionId2);

                    this.PluginManager.BroadcastChatMessage(
                        string.Format(
                            "Collision between {0} and {1} with {2}km/h",
                            driver.DriverName,
                            driver2.DriverName,
                            Math.Round(incident.ImpactSpeed)));
                }
                else if (this.BroadcastIncidents > 1)
                {
                    this.PluginManager.BroadcastChatMessage(
                        string.Format("{0} crashed into wall with {1}km/h", driver.DriverName, Math.Round(incident.ImpactSpeed)));
                }
            }
        }
Example #2
0
 protected internal virtual void OnCollision(IncidentInfo msg)
 {
 }