Beispiel #1
0
 /// <summary>
 /// Setup the UI box for the specified fighter
 /// </summary>
 /// <param name="fighter"></param>
 /// <returns></returns>
 public UIBox AddFighterInfo(ActiveFighter fighter)
 {
     Items.Clear();
     Items.Add(new UIText("AI Player", new Point(14, 16), 0.4f, Color.White, GTA.Font.ChaletComprimeCologne, false));
     Items.Add(new UIText(fighter.Team.TeamInfo.FriendlyName, new Point(14, 35), 0.4f, Color.White, GTA.Font.ChaletComprimeCologne, false));
     Items.Add(new UIText("KILLED", new Point(78, 5), 0.34f, Color.White, GTA.Font.Monospace, false));
     Items.Add(new UIRectangle(new Point(166, 40), new Size(21, 13), Color.FromArgb(180, fighter.Team.Color)));
     imageAsset = fighter.Team.TeamInfo.AltImageAsset;
     return this;
 }
Beispiel #2
0
        /// <summary>
        /// Set active target for vehicle mission natives.
        /// </summary>
        /// <param name="fighter"></param>
        public void SetActiveTarget(ActiveFighter fighter)
        {
            var pos = fighter.ManagedPed.Position;

            Function.Call(Hash.TASK_PLANE_MISSION,
                          ManagedPed.Handle,
                          ManagedVehicle.Handle,
                          fighter.ManagedVehicle.Handle,
                          fighter.ManagedPed.Handle,
                          pos.X, pos.Y, pos.Z,
                          6, 70.0, -1.0, 30.0, 500, 50);

            ActiveTarget = fighter;
        }
 public static void StopUpdate(ActiveFighter fighter)
 {
     _activeTeams[fighter.Team.Index].ActiveFighters.Remove(fighter);
 }
 /// <summary>
 /// Find the team with the least members and assign it to the fighter.
 /// </summary>
 /// <param name="newFighter">Target fighter.</param>
 /// <param name="activeFighters">Active fighters.</param>
 public static void SetupTeam(ActiveFighter newFighter)
 {
     var memberCounts = _activeTeams.Select(x => x.ActiveFighters.Count).ToList();
     var team = _activeTeams[memberCounts.IndexOf(memberCounts.Min())];
     newFighter.AssignTeam(team);
     team.ActiveFighters.Add(newFighter);
 }
        /// <summary>
        /// Set active target for vehicle mission natives.
        /// </summary>
        /// <param name="fighter"></param>
        public void SetActiveTarget(ActiveFighter fighter)
        {
            var pos = fighter.ManagedPed.Position;
            Function.Call(Hash.TASK_PLANE_MISSION,
                ManagedPed.Handle,
                ManagedVehicle.Handle,
                fighter.ManagedVehicle.Handle,
                fighter.ManagedPed.Handle,
                pos.X, pos.Y, pos.Z,
                6, 70.0, -1.0, 30.0, 500, 50);

            ActiveTarget = fighter;
        }
 /// <summary>
 /// Fight against the specifed fighter.
 /// </summary>
 /// <param name="fighter"></param>
 public void FightAgainst(ActiveFighter fighter)
 {
     ManagedPed.Ped.Task.FightAgainst(fighter.ManagedPed.Ped);
 }
Beispiel #7
0
 /// <summary>
 /// Fight against the specifed fighter.
 /// </summary>
 /// <param name="fighter"></param>
 public void FightAgainst(ActiveFighter fighter)
 {
     ManagedPed.Ped.Task.FightAgainst(fighter.ManagedPed.Ped);
 }