コード例 #1
0
 public override void DrawOnEveryFrame()
 {
     if (IsActivated && !IsAccomplished)
     {
         // Draw marker
         if (IsDrawMarker && MissionMarker.IsPlayerInDrawDistance)
         {
             MissionMarker.DrawThisFrame();
         }
         // Draw hint
         if (Location.IsPlayerInside)
         {
             Screen.DisplayHelpTextThisFrame(HelpText);
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// Update Capture location if confirmed victim killed by player, both in restrict location.
        /// </summary>
        private void UpdateCaptureLocation(Ped victim, bool isMeleeDamage, uint weaponInfoHash, int damageTypeFlag)
        {
            var position   = victim.Position;
            var victimType = GetPedType(victim.Handle);

            // [Player,1|Male,4|Female,5|Cop,6|Human,26|SWAT,27|Animal,28|Army,29]
            if (victimType == 6 || victimType == 27 || victimType == 29)
            {
                if (RestrictLocation.IsPositionInside(position) && RestrictLocation.IsPlayerInside)
                {
                    CaptureLocation = new Location(position, 5f);
                    MissionMarker   = new MissionMarker(position, new Vector3(5f));
                    IsDrawMarker    = true;
                }
            }
        }
コード例 #3
0
        public override void StartDrawing()
        {
            if (!(Blip is null))
            {
                Blip.Delete();
            }
            Blip              = World.CreateBlip(Location.Position);
            Blip.Color        = BlipColor.Yellow;
            Blip.IsShortRange = true;
            Blip.ShowRoute    = IsShowRoute;
            Blip.Sprite       = BlipSprite.Rampage;
            Blip.Name         = Name;

            MissionMarker = new MissionMarker(Location.Position, new Vector3(Location.Radius));
            IsDrawMarker  = true;
        }
コード例 #4
0
 public override void DrawOnEveryFrame()
 {
     if (IsActivated && !IsAccomplished)
     {
         // Draw marker
         if (IsDrawMarker && CaptureLocation.IsPlayerInDrawDistance)
         {
             MissionMarker.DrawThisFrame();
         }
         // Draw hint
         if (!RestrictLocation.IsPlayerInside)
         {
             Screen.DisplayHelpTextThisFrame("请立即返回任务场地!");
         }
         else if (CaptureLocation.IsPlayerInside)
         {
             Screen.DisplayHelpTextThisFrame(SubHelpText);
         }
     }
 }