Advertisement
Guest User

C# Code

a guest
Apr 22nd, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.99 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows.Forms;
  7. using GTA;
  8. using GTA.Native;
  9.  
  10. namespace TrackersV
  11. {
  12.     public class TrackersV : Script
  13.     {
  14.         public TrackersV()
  15.         {
  16.             KeyDown += (sender, e) =>
  17.             {
  18.                 if (e.KeyCode == Keys.J)
  19.                 {
  20.                     Entity Target;
  21.                     Target = Game.Player.GetTargetedEntity();
  22.                     if (Target != null)
  23.                     {
  24.                         if (Target.CurrentBlip == null)
  25.                         {
  26.                             BlipColor blipColor;
  27.                             if (Game.Player.Character.Model == PedHash.Michael)
  28.                             {
  29.                                 blipColor = BlipColor.Michael;
  30.                             }
  31.                             else if (Game.Player.Character.Model == PedHash.Franklin)
  32.                             {
  33.                                 blipColor = BlipColor.Franklin;
  34.                             }
  35.                             else if (Game.Player.Character.Model == PedHash.Trevor)
  36.                             {
  37.                                 blipColor = BlipColor.Trevor;
  38.                             }
  39.                             else
  40.                             {
  41.                                 blipColor = BlipColor.Freemode;
  42.                             }
  43.                             Target.AddBlip();
  44.                             Target.CurrentBlip.Sprite = BlipSprite.BigCircle;
  45.                             Target.CurrentBlip.Color = blipColor;
  46.                             Target.CurrentBlip.Name = Target.Model.ToString();
  47.                         }
  48.                     }
  49.                     else if (Target.CurrentBlip != null)
  50.                     {
  51.                         Target.CurrentBlip.Remove();
  52.                     }
  53.                 }
  54.             };
  55.         }
  56.  
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement