![]() |
#1
|
|||
|
|||
![]()
I'm looking for a little help in a script.
I have been putting together a Server commander for CloD and have some of it working. I have the following method that I use to pass back info when a pilot creates a new plane (Spawns in) but I would like to have a little more information. I have Player Name Player position Army Plane Plane Type Spawn location I need the fuel quantity selected, loadouts, and markings. here is the basic method that is called from OnPlaceEntered: Code:
public void sortieBegin(Player p, AiActor actor, int placeIndex) { try { String timeStamp = ConvertToTimestamp(DateTime.Now); AiAircraft aircraft = actor as AiAircraft; if (aircraft == null) { return; } String acType = aircraft.Type().ToString(); // Fighter, Heavy Fighter, etc String acName = aircraft.InternalTypeName(); // Plane (Bf109E, etc) String callSign = aircraft.CallSign(); // Not useful String playerPosition = aircraft.CrewFunctionPlace(placeIndex).ToString(); // Pilot, Gunner, Bombadier, etc String pilotName = p.Name(); int army = p.Army(); Point2d actorPos = new Point2d(actor.Pos().x, actor.Pos().y); String startingGrid = GamePlay.gpSectorName(actorPos.x, actorPos.y).ToString(); svr.SendMessage(StatCommands.SortieBegin + "::" + pilotName + "::" + army + "::" + acName + "::" + acType + "::" + playerPosition + "::" + "::" + startingGrid); } catch (Exception ex) { System.Console.WriteLine("IL2ClodStats.sortieBegin - Exception: " + ex); // Error coding } Thanks, RAF238thWildWillie |
|
|