Thread: Planes despawn
View Single Post
  #2  
Old 01-04-2013, 11:11 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Code:
    public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
    {
        base.OnAircraftLanded(missionNumber, shortName, aircraft);

        double DespawnAfter = 5 * 60;   // seconds after landing
        Timeout(DespawnAfter, () =>     // despawn after specified seconds
        {
            try { aircraft.Destroy(); }
            catch { }
        });
    }
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote