Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2011, 02:52 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default How to get plane ID?

Can someone supply the C# code to get the players airplane ID/serial no please.

[edit] I think I found it. Something like ...

String acName = aircraft.InternalTypeName(); // Plane (Bf109E, etc)
String callSign = aircraft.CallSign(); // Plane ID
__________________
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

Last edited by salmo; 10-21-2011 at 03:06 AM.
Reply With Quote
  #2  
Old 10-21-2011, 04:03 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

(actor as AiAircraft).TypedName() shows tactical Number of plane.
Reply With Quote
  #3  
Old 10-21-2011, 09:32 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by FG28_Kodiak View Post
(actor as AiAircraft).TypedName() shows tactical Number of plane.
What would be the difference with (actor as AiAircraft).Name() ?
Reply With Quote
  #4  
Old 10-21-2011, 11:02 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Name is the actor name ingame.
TypedName is only the tactical number.

Example:
Code:
    public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceEnter(player, actor, placeIndex);
        GamePlay.gpLogServer(null, "Name: {0}", new object[] { (actor as AiAircraft).Name() });
        GamePlay.gpLogServer(null, "TypedName: {0}", new object[] { (actor as AiAircraft).TypedName() });
    }
Result:
Name: 0:BoB_LW_LG2_I.000
TypedName: 1 +

If the player use his own number, you will get this number.
Reply With Quote
  #5  
Old 10-21-2011, 02:27 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Thank you very much!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.