View Single Post
  #2  
Old 12-10-2011, 01:26 PM
Octocat Octocat is offline
Approved Member
 
Join Date: Dec 2011
Posts: 22
Default

Code:
int armyPlayer = GamePlay.gpPlayer().Army();
int armyRed = 1;
int armyBlue = 2;
Full interfaces:

Code:
namespace maddox.game
{
  public interface Player
  {
    int Army();                           // Player army
    bool AutopilotPrimary();
    bool AutopilotSecondary();
    int Channel();
    string ConnectAddress();
    int ConnectPort();
    bool IsConnected();
    bool IsExpelArmy(int army);
    bool IsExpelUnit(AiActor unit);
    string LanguageName();
    string Name();
    AiPerson PersonPrimary();
    AiPerson PersonSecondary();
    int Ping();
    AiActor Place();
    void PlaceEnter(AiActor actor, int indxPlace);
    void PlaceLeave(int indxPlace);
    int PlacePrimary();
    int PlaceSecondary();
    void SelectArmy(int army);
  }

  public interface IGamePlay
  {
    AiActor gpActorByName(string actorName);
    bool gpActorIsValid(AiActor actor);
    AiAirGroup gpAiAirGroup(int ID, int army);
    AiAirGroup[] gpAirGroups(int Army);
    AiAirport[] gpAirports();
    int[] gpArmies();                                    //All armies
    string gpArmyName(int army);
    void gpAviPlay(string args);
    bool gpBattleIsRun();
    void gpBattleStop();
    AiBirthPlace[] gpBirthPlaces();
    ISectionFile gpConfigUserFile();
    ISectionFile gpCreateSectionFile();
    ISectionFile gpCreateSectionFile(string line, out string firstWord);
    DifficultySetting gpDifficultyGet();
    IRecalcPathParams gpFindPath(Point2d a, double ra, Point2d b, double rb, PathType type, int army);
    int gpFrontArmy(double x, double y);
    double gpFrontDistance(int army, double x, double y);
    bool gpFrontExist();
    AiAction gpGetAction(string name);
    AiTrigger gpGetTrigger(string name);
    AiGroundGroup[] gpGroundGroups(int Army);
    void gpHUDLogCenter(string msg);
    void gpHUDLogCenter(Player[] to, string msg);
    void gpHUDLogCenter(Player[] to, string msg, object[] parms);
    void gpHUDLogCenter(Player[] to, string msg, object[] parms, double lifeTime);
    object[] gpInvoke(object[] args);
    bool gpIsServerDedicated();
    bool gpIsServerSingle();
    bool gpIsValidAccess();
    LandTypes gpLandType(double x, double y);
    ISectionFile gpLoadSectionFile(string fileName);
    void gpLogServer(Player[] to, string format, object[] args);
    void gpLogServerArg(bool newArg, string format, object[] parms);
    void gpLogServerBegin(Player[] to, string format);
    void gpLogServerEnd();
    AiAirGroup gpMakeAirGroup(AiAircraft[] items, AiAirWayPoint[] way);
    int gpNextMissionNumber();
    Player gpPlayer();
    void gpPostMissionLoad(ISectionFile file);
    void gpPostMissionLoad(string fileName);
    Player[] gpRemotePlayers();
    string gpSectorName(double x, double y);
    void gpSetOrderMissionMenu(Player player, bool thisSubMenu, int ID, string[] keys, bool[] bSubMenu);
    ITime gpTime();
  }
}
Reply With Quote