Ejemplo n.º 1
0
 public MissionNPC(PedHash model, Family fam, Vector3 position, float h, string nm, Mission.Type t, int r)
     : base(fam, model, position, h)
 {
     name = nm;
     missionType = t;
     repNeeded = r;
 }
Ejemplo n.º 2
0
 public Member(Family f, PedHash m, Vector3 p, float h)
     : base(new Ped(1337))
 {
     family = f;
     model = m;
     position = new Vector3(p.X, p.Y, p.Z-1f);
     heading = h;
 }
Ejemplo n.º 3
0
 public StatusMenu(Family f)
 {
     family = f;
     mainPos = new Point(279, 981);
     background = new Rectangle(mainPos.X, mainPos.Y, 250, 100, Color.Black, 50, 1, Color.Black);
     lfamily = new Label(family.GetName(), new Point(mainPos.X + 10, mainPos.Y + 10), 0.3f);
     lstatus = new Label(SaveData.Instance.GetProgress().ToString(), new Point(mainPos.X + 10, mainPos.Y + 35), 0.3f);//TODO get current lfamily status
     progressBar = new ProgressBar(mainPos.X + 10, mainPos.Y + 65, 230, 25, Color.Black, 50, Color.Blue, 100);//TODO get current color
     progressBar.SetMax(1000);
     progressBar.SetValue(500);
 }
Ejemplo n.º 4
0
 public Member(Family f, PedHash m, Vector3 p)
     : this(f, m, p, 0.0f)
 {
 }
Ejemplo n.º 5
0
 public Member(Family f, PedHash m, Vector2 p)
     : this(f, m, new Vector3(p.X, p.Y, World.GetGroundHeight(new Vector2(p.X, p.Y))))
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new MissionNPC
 /// </summary>
 /// <param name="fam">The family</param>
 /// <param name="model">The model</param>
 /// <param name="pos">The position</param>
 /// <param name="heading">The way the npc is facing</param>
 /// <param name="name">The name of the npc</param>
 /// <param name="mtype">The mission type this npc gives</param>
 /// <param name="rep">The repetition needed to start a mission</param>
 /// <returns>Returns a new MissionNPC</returns>
 protected MissionNPC CreateMissionNPC(Family fam, PedHash model, Vector3 pos, float heading, string name, Mission.Type mtype, int rep)
 {
     MissionNPC qm = new MissionNPC(model, fam, pos, heading, name, mtype, rep);
     for (int i = questMembers.Count-1; i >= 0 ; i--)
     {
         if (questMembers[i] == null)
         {
             continue;
         }
         MissionNPC qmem = questMembers[i];
         if (qmem.Equals(qm))
         {
             qmem.Dispose();
             questMembers.Remove(qmem);
             break;
         }
     }
     questMembers.Add(qm);
     return qm;
 }
Ejemplo n.º 7
0
 protected Member CreateMember(Family f, Vector3 p, Member.WeaponType w, bool isDriver, Vehicle v = null)
 {
     Member m = new Member(f, getRandomModel(), p);
     switch (w)
     {
         case Member.WeaponType.Melee:
             m.GiveWeapon(getRandomMeleeWeapon());
             break;
         case Member.WeaponType.Ranged:
             m.GiveWeapon(getRandomRangedWeapon());
             break;
         case Member.WeaponType.Both:
             m.GiveWeapon(getRandomWeapon());
             break;
     }
     if (isDriver)
     {
         m.GiveVehicle(getRandomVehicle());
     }else if (v != null)
     {
         m.MakePassenger(v);
     }
     return m;
 }