Exemple #1
0
 private void LoadIniFile()
 {
     try
     {
         this.Config                     = ScriptSettings.Load(this.f_Settings);
         this.modEnabled                 = (bool)this.Config.GetValue <bool>("SETTINGS", "modEnabled", (M0)1);
         this.reallifeDateTime           = (bool)this.Config.GetValue <bool>("SETTINGS", "REALLIFE_DATETIME", (M0)0);
         this.displayArtificialHorizon   = (bool)this.Config.GetValue <bool>("SETTINGS", "DISPLAY_ARTIFICIAL_HORIZON", (M0)1);
         this.display3DRadar             = (bool)this.Config.GetValue <bool>("SETTINGS", "DISPLAY_3D_RADAR", (M0)1);
         this.displayMinimapRadar        = (bool)this.Config.GetValue <bool>("SETTINGS", "DISPLAY_MINIMAP_RADAR", (M0)1);
         this.displayMissileWarnSystem   = (bool)this.Config.GetValue <bool>("SETTINGS", "DISPLAY_MISSILE_WARN_SYSTEM", (M0)1);
         this.staticArtificialHorizon    = (bool)this.Config.GetValue <bool>("SETTINGS", "STATIC_ARTIFICIAL_HORIZON", (M0)0);
         this.gpsRefreshRate             = (long)this.Config.GetValue <long>("SETTINGS", "GPS_REFRESH_RATE", (M0)500L);
         this.getAllVehiclesInterval     = (long)this.Config.GetValue <long>("SETTINGS", "3D_RADAR_REFRESH_RATE", (M0)10000L);
         this.getAllPropsInterval        = (long)this.Config.GetValue <long>("SETTINGS", "MISSILE_WARN_SYSTEM_REFRESH_RATE", (M0)100L);
         this.color_HUD                  = Color.FromArgb((int)this.Config.GetValue <int>("SETTINGS", "HUD_A", (M0)(int)byte.MaxValue), (int)this.Config.GetValue <int>("SETTINGS", "HUD_R", (M0)67), (int)this.Config.GetValue <int>("SETTINGS", "HUD_G", (M0)197), (int)this.Config.GetValue <int>("SETTINGS", "HUD_B", (M0)0));
         this.xOffsetRight               = float.Parse(((string)this.Config.GetValue <string>("SETTINGS", "XOFFSET_RIGHT_ELEMENTS", (M0)"0.0")).Replace(',', '.'), (IFormatProvider)CultureInfo.InvariantCulture);
         this.SupportedAircraftList      = new List <string>((IEnumerable <string>)File.ReadAllLines(this.f_Aircrafts));
         this.blipRadius                 = 10000f;
         this.airplaneSprite             = (BlipSprite)423;
         this.helicopterSprite           = (BlipSprite)422;
         this.BlipColor                  = (BlipColor)2;
         this.onlyShowAircraftWithDriver = true;
     }
     catch (Exception ex)
     {
         UI.Notify("~r~Error~w~:Failed to load JET HUD settings.");
     }
 }
Exemple #2
0
        public async Task CheckEscape()
        {
            if (_firstTick)
            {
                API.SetNuiFocus(false, false);
                BlipColor blipColor = BlipColor.TrevorOrange;
                string    blipName  = "Prison";
                Blip      blip      = new Blip(CitizenFX.Core.World.CreateBlip(_bolingbrokePrison).Handle)
                {
                    Sprite       = BlipSprite.Key,
                    Color        = blipColor,
                    IsShortRange = true,
                    Name         = blipName
                };
                _firstTick = false;
            }

            if (_playerJailed)
            {
                if (LocalPlayer.Character.Position.DistanceTo(_jailPos) > 140f)
                {
                    await SwitchOut(_jailPos, 2000);
                    await Scaleform("~r~ESCAPE ATTEMPT FAILED", "Your sentence has been extended by 600 seconds.", true);
                }
            }

            await Delay(20);
        }
Exemple #3
0
    /// <summary>
    /// Sets up all correctly configured PlayerPed
    /// </summary>
    private void SetupPlayerPeds()
    {
        foreach (UserIndex player in userIndices)
        {
            if (bool.Parse(PlayerSettings.GetValue(player, EnabledKey, false.ToString())))
            {
                string guid = PlayerSettings.GetValue(player, ControllerKey, "");

                foreach (InputManager input in InputManager.GetAvailableInputManagers())
                {
                    if (input.DeviceGuid.Equals(guid))
                    {
                        InputManager manager = input;
                        if (input is DirectInputManager)
                        {
                            manager = DirectInputManager.LoadConfig(((DirectInputManager)input).device, GetIniFile());
                        }

                        PedHash    characterHash = PlayerSettings.GetEnumValue <PedHash>(player, CharacterHashKey, PedHash.Trevor.ToString());
                        BlipSprite blipSprite    = PlayerSettings.GetEnumValue <BlipSprite>(player, BlipSpriteKey, BlipSprite.Standard.ToString());
                        BlipColor  blipColor     = PlayerSettings.GetEnumValue <BlipColor>(player, BlipColorKey, BlipColor.Green.ToString());

                        PlayerPed playerPed = new PlayerPed(player, characterHash, blipSprite, blipColor, player1, manager);
                        playerPeds.Add(playerPed);
                        break;
                    }
                }
            }
        }
    }
Exemple #4
0
 public BlipData(Entity entity, BlipSprite sprite, BlipCategory category, BlipColor color = BlipColor.White, bool isShortRange = true)
 {
     this.isEntityBlip = true;
     this.Entity       = entity;
     this.Sprite       = sprite;
     this.Color        = color;
     this.IsShortRange = isShortRange;
     this.Category     = category;
     Create();
 }
Exemple #5
0
 public BlipData(Vector3 position, BlipSprite sprite, BlipCategory category, BlipColor color = BlipColor.White, bool isShortRange = true)
 {
     this.isEntityBlip = false;
     this.Position     = position;
     this.Sprite       = sprite;
     this.Color        = color;
     this.IsShortRange = isShortRange;
     this.Category     = category;
     Create();
 }
Exemple #6
0
        /// <summary>
        /// OnAccept will be called when the player accepts the call.
        /// You must call base.OnAccept(args) to initialise the default properties
        /// </summary>
        protected void OnAccept(float circleRadius = 75f, BlipColor color = BlipColor.Yellow, BlipSprite sprite = BlipSprite.BigCircle, int alpha = 100)
        {
            int blipHandle = AddBlipForRadius(this.Location.X, this.Location.Y, this.Location.Z, circleRadius);

            this.Radius        = circleRadius;
            this.Marker        = new Blip(blipHandle);
            this.Marker.Sprite = sprite;
            this.Marker.Color  = color;
            this.Marker.Alpha  = alpha;
        }
Exemple #7
0
        /// <summary>
        /// OnAccept will be called when the player accepts the call.
        /// You must call base.OnAccept(args) to initialise the default properties
        /// </summary>
        protected void InitBlip(float circleRadius = 75f, BlipColor color = BlipColor.Yellow, BlipSprite sprite = BlipSprite.BigCircle, int alpha = 100)
        {
            Blip blip = World.CreateBlip(Location, circleRadius);

            Radius        = circleRadius;
            Marker        = blip;
            Marker.Sprite = sprite;
            Marker.Color  = color;
            Marker.Alpha  = alpha;
        }
Exemple #8
0
 public BuildableInventoryItem(int amount, int maxAmount, string id, string description, string propName, BlipSprite blipSprite, BlipColor blipColor, Vector3 groundOffset, bool interactable, bool isDoor, bool canBePickedUp)
     : base(amount, maxAmount, id, description)
 {
     PropName      = propName;
     BlipSprite    = blipSprite;
     BlipColor     = blipColor;
     GroundOffset  = groundOffset;
     Interactable  = interactable;
     IsDoor        = isDoor;
     CanBePickedUp = canBePickedUp;
 }
Exemple #9
0
        public static Blip CreateBlip(Vector3 _pos, BlipSprite _sprite, BlipColor _color, string _label, bool _isShortRange, float _scale = 0.75f)
        {
            Blip b = World.CreateBlip(_pos);

            b.Sprite       = _sprite;
            b.Color        = _color;
            b.IsShortRange = _isShortRange;
            b.Name         = _label;
            b.Scale        = _scale;
            return(b);
        }
Exemple #10
0
        private Blip CreateBlip(Vector3 position, BlipSprite sprite, BlipColor color, string name, bool shortRange = true, float scale = 0.86f)
        {
            var blip = World.CreateBlip(position);

            blip.Sprite       = sprite;
            blip.Color        = color;
            blip.IsShortRange = shortRange;
            blip.Name         = name;
            blip.Scale        = scale;

            return(blip);
        }
Exemple #11
0
        public static void AddBlipOn(Entity en, float scale, BlipSprite bs, BlipColor bc, string bn)
        {
            if (Main.NoBlipOnCriminal || !ThereIs(en))
            {
                return;
            }

            en.AddBlip();
            en.CurrentBlip.Scale        = scale;
            en.CurrentBlip.Sprite       = bs;
            en.CurrentBlip.Color        = bc;
            en.CurrentBlip.Name         = bn;
            en.CurrentBlip.IsShortRange = true;
        }
Exemple #12
0
 public MapProp(string id, string propName, BlipSprite blipSprite, BlipColor blipColor, Vector3 groundOffset, bool interactable, bool isDoor, bool canBePickedUp, Vector3 rotation, Vector3 position, int handle, List <Weapon> weapons)
 {
     Id            = id;
     PropName      = propName;
     BlipSprite    = blipSprite;
     BlipColor     = blipColor;
     GroundOffset  = groundOffset;
     Interactable  = interactable;
     IsDoor        = isDoor;
     CanBePickedUp = canBePickedUp;
     Rotation      = rotation;
     Position      = position;
     Handle        = handle;
     Weapons       = weapons;
 }
 public MapProp(string id, string propName, BlipSprite blipSprite, BlipColor blipColor, Vector3 groundOffset, bool interactable, bool isDoor, bool canBePickedUp, Vector3 rotation, Vector3 position, int handle, List <Weapon> weapons)
 {
     this.Id            = id;
     this.PropName      = propName;
     this.BlipSprite    = blipSprite;
     this.BlipColor     = blipColor;
     this.GroundOffset  = groundOffset;
     this.Interactable  = interactable;
     this.IsDoor        = isDoor;
     this.CanBePickedUp = canBePickedUp;
     this.Rotation      = rotation;
     this.Position      = position;
     this.Handle        = handle;
     this.Weapons       = weapons;
 }
        public void ManageDeadTerrorists()
        {
            var removedTerrorists = new List <Terrorist>();

            foreach (var terrorist in Terrorists)
            {
                if (!terrorist.Ped.IsAlive)
                {
                    if (terrorist.Ped.AttachedBlip != null)
                    {
                        terrorist.Ped.AttachedBlip.Delete();
                    }
                    removedTerrorists.Add(terrorist);
                }
            }

            foreach (var terrorist in removedTerrorists)
            {
                Terrorists.Remove(terrorist);
                _DeadTerrorists.Add(terrorist);
                terrorist.Ped.MarkAsNoLongerNeeded();
            }

            /*if (Terrorists.Count < 5 && TerroristsAmount >= 5 && !ReinforcementsSent)
             * {
             *  CurrentSoldierBlipColor = BlipColor.Orange;
             *  ZoneBlip.IsFlashing = true;
             *  Screen.ShowSubtitle("Reinforcements incoming !", 5000);
             *  SpawnReinforcements();
             *  return;
             * }*/

            if (Terrorists.Count == 0)
            {
                if (ReinforcementsSent)
                {
                    CurrentSoldierBlipColor = BlipColor.GreyDark;
                }

                Screen.ShowSubtitle("Congratulations - " + GroupName + " (" + TerroristsAmount + " soldiers) defeated", 15000);
                SetCaptured();
            }
        }
Exemple #15
0
        private void blipUpdate(float x, float y, float z)
        {
            if (!hasControlJob)
            {
                return;
            }
            if (bcBlip != null)
            {
                bcBlip.Delete();
            }

            Vector3         pos = new Vector3(x, y, z);
            const BlipColor bc  = BlipColor.Red;

            bcBlip = new Blip(World.CreateBlip(pos).Handle)
            {
                Sprite       = BlipSprite.Handcuffs,
                Color        = bc,
                IsShortRange = true,
                Name         = "Baitcar",
                IsFlashing   = false
            };
        }
Exemple #16
0
        public bool IsCreatedIn(float radius, Vector3 safePosition, List <string> selectedModels, int teamID, BlipColor teamColor, string teamName)
        {
            Vector3 position = World.GetNextPositionOnSidewalk(safePosition);

            if (position.Equals(Vector3.Zero) || selectedModels == null || teamName == null)
            {
                Logger.Error("GangTeam: Couldn't find safe position or selected models. Abort.", "");

                return(false);
            }

            Logger.Write(false, "GangTeam: Creating members.", "");
            this.relationship = teamID;

            for (int i = 0; i < 6; i++)
            {
                Ped p = Util.Create(selectedModels[Util.GetRandomIntBelow(selectedModels.Count)], position);

                if (!Util.ThereIs(p))
                {
                    Logger.Error("GangTeam: Couldn't create a member. Skip to set characteristics.", "");

                    continue;
                }

                if (Util.GetRandomIntBelow(3) == 0)
                {
                    p.Weapons.Give(closeWeapons[Util.GetRandomIntBelow(closeWeapons.Count)], 1, true, true);
                }
                else
                {
                    p.Weapons.Give(standoffWeapons[Util.GetRandomIntBelow(standoffWeapons.Count)], 300, true, true);
                }

                Util.SetCombatAttributesOf(p);
                p.RelationshipGroup          = relationship;
                p.IsPriorityTargetForEnemies = true;

                p.AlwaysKeepTask       = true;
                p.BlockPermanentEvents = true;
                p.Armor = Util.GetRandomIntBelow(100);
                Logger.Write(false, "GangTeam: Characteristics are set.", "");

                if (Util.BlipIsOn(p))
                {
                    Logger.Error("GangTeam: Blip is already on the member. Delete this member to abort.", "");
                    p.Delete();
                }
                else
                {
                    Util.AddBlipOn(p, 0.7f, BlipSprite.Rampage, teamColor, teamName);
                    Logger.Write(false, "GangTeam: Create a member successfully.", "");
                    members.Add(p);
                }
            }

            if (members.Find(p => !Util.ThereIs(p)) == null)
            {
                Logger.Write(false, "GangTeam: Create gang team successfully.", "");

                return(true);
            }
            else
            {
                Logger.Error("GangTeam: There is a member who doesn't exist. Abort.", "");
                Restore(true);

                return(false);
            }
        }
 public Terrorist(FighterConfiguration cfg, BlipColor bColor)
 {
     FighterCfg = cfg;
     _BlipColor = bColor;
 }
Exemple #18
0
        private static void AddMarker(string _markerKey, string _markerName, string _markerActionType, Vector3 _markerPos, string _markerType, Dictionary <string, object> _markerData, string _markerColor, string _markerWaypointColor)
        {
            Utils.WriteLine($"Adding Marker[{_markerKey}]");
            MarkerType markerType = MarkerType.VerticalCylinder;
            BlipColor  blipColor  = BlipColor.Green;

            switch (_markerColor)
            {
            case "Green":
                blipColor = BlipColor.Green;
                break;

            default:
                break;
            }

            switch (_markerWaypointColor)
            {
            case "Green":
                blipColor = BlipColor.Green;
                break;

            default:
                break;
            }

            CitizenFX.Core.Blip MarkerBlip = World.CreateBlip(_markerPos);
            MarkerBlip.Color        = blipColor;
            MarkerBlip.IsShortRange = true;
            MarkerBlip.Name         = _markerName;

            /*//Get the 3D marker type of the marker (ie. VerticalCylinder)
             * foreach (MarkerType mt in Enum.GetValues(typeof(MarkerType)))
             * {
             *  if (mt.ToString() == _markerType)
             *  {
             *      markerType = mt;
             *  }
             * }*/

            object markerData = null;
            string stringPos  = "";

            if (_markerData != null)
            {
                foreach (var v in _markerData)
                {
                    if (v.Key.ToLower().Contains("position"))
                    {
                        stringPos += v.Value + ",";
                    }
                    else if (v.Key.ToLower().Contains("vehicles"))
                    {
                        markerData = v.Value;
                    }
                    else if (v.Key.ToLower().Contains("markerteleport"))
                    {
                        markerData = v.Value;
                    }
                }
            }

            if (_markerActionType.ToLower() == "cardealermarker")
            {
                if (stringPos != "")
                {
                    string[] stringArr    = stringPos.Split(',');
                    Vector3  dataPosition = new Vector3(int.Parse(stringArr[0]), int.Parse(stringArr[1]), int.Parse(stringArr[2]));
                    AddMarker(_markerKey + "_sell", "Sell Vehicle", "SellVehicleMarker", dataPosition, _markerType, null, _markerColor, _markerWaypointColor);
                }
            }
            else
            {
                if (stringPos != "")
                {
                    string[] stringArr    = stringPos.Split(',');
                    Vector3  dataPosition = new Vector3(int.Parse(stringArr[0]), int.Parse(stringArr[1]), int.Parse(stringArr[2]));
                    markerData = dataPosition;
                }
            }

            Marker newMarker = new Marker(_markerKey, _markerName, _markerPos, _markerType, _markerActionType, markerData);

            MarkerList.Add(newMarker);
        }
Exemple #19
0
 public WeaponStorageInventoryItem(int amount, int maxAmount, string id, string description, string propName, BlipSprite blipSprite, BlipColor blipColor, Vector3 groundOffset, bool interactable, bool isDoor, bool canBePickedUp, List <Weapon> weaponsList)
     : base(amount, maxAmount, id, description, propName, blipSprite, blipColor, groundOffset, interactable, isDoor, canBePickedUp)
 {
     this.WeaponsList = weaponsList;
 }
Exemple #20
0
 public Blip()
 {
     _currentColor = BlipColor.Default;
     Icon          = BlipIcon.MiscDestination;
 }
 public StreamedPed(PedStreamer streamer, string model, string networkname, Vector3 position, float heading, BlipColor color)
     : base(streamer)
 {
     this.position      = position;
     this.heading       = heading;
     this.networkname   = networkname;
     this.model         = model;
     direction          = Vector3.Zero;
     hasNetworkName     = false;
     vehicle_id         = 0;
     CurrentChatMessage = "";
     animator           = new PedAnimationManager(this);
 }
Exemple #22
0
        public static Color GetBlipcolor(BlipColor col, int a)
        {
            switch ((int)col)
            {
            default: return(Color.FromArgb(a, 255, 255, 255)); // (21, 27)

            case 1: return(Color.FromArgb(a, 224, 50, 50));    // (54, 27)

            case 2: return(Color.FromArgb(a, 114, 204, 114));  // (87, 27)

            case 3: return(Color.FromArgb(a, 93, 182, 229));   // (120, 27)

            case 4: return(Color.FromArgb(a, 240, 240, 240));  // (153, 27)

            case 5: return(Color.FromArgb(a, 240, 200, 80));   // (186, 27)

            case 6: return(Color.FromArgb(a, 194, 80, 80));    // (219, 27)

            case 7: return(Color.FromArgb(a, 156, 110, 175));  // (252, 27)

            case 8: return(Color.FromArgb(a, 255, 123, 196));  // (285, 27)

            case 9: return(Color.FromArgb(a, 229, 176, 147));  // (318, 27)

            case 10: return(Color.FromArgb(a, 199, 131, 209)); // (21, 60)

            case 11: return(Color.FromArgb(a, 215, 189, 121)); // (54, 60)

            case 12: return(Color.FromArgb(a, 139, 179, 167)); // (87, 60)

            case 13: return(Color.FromArgb(a, 123, 156, 84));  // (120, 60)

            case 14: return(Color.FromArgb(a, 144, 127, 153)); // (153, 60)

            case 15: return(Color.FromArgb(a, 106, 196, 191)); // (186, 60)

            case 16: return(Color.FromArgb(a, 214, 196, 153)); // (219, 60)

            case 17: return(Color.FromArgb(a, 234, 142, 80));  // (252, 60)

            case 18: return(Color.FromArgb(a, 152, 203, 234)); // (285, 60)

            case 19: return(Color.FromArgb(a, 178, 98, 135));  // (318, 60)

            case 20: return(Color.FromArgb(a, 144, 142, 122)); // (21, 92)

            case 21: return(Color.FromArgb(a, 166, 117, 94));  // (54, 92)

            case 22: return(Color.FromArgb(a, 175, 168, 168)); // (87, 92)

            case 23: return(Color.FromArgb(a, 232, 142, 155)); // (120, 92)

            case 24: return(Color.FromArgb(a, 187, 214, 91));  // (153, 92)

            case 25: return(Color.FromArgb(a, 12, 123, 86));   // (186, 92)

            case 26: return(Color.FromArgb(a, 123, 196, 255)); // (219, 92)

            case 27: return(Color.FromArgb(a, 171, 60, 230));  // (252, 92)

            case 28: return(Color.FromArgb(a, 206, 169, 13));  // (285, 92)

            case 29: return(Color.FromArgb(a, 71, 99, 173));   // (318, 92)

            case 30: return(Color.FromArgb(a, 42, 166, 185));  // (21, 125)

            case 31: return(Color.FromArgb(a, 186, 157, 125)); // (54, 125)

            case 32: return(Color.FromArgb(a, 201, 225, 255)); // (87, 125)

            case 33: return(Color.FromArgb(a, 240, 240, 150)); // (120, 125)

            case 34: return(Color.FromArgb(a, 237, 140, 161)); // (153, 125)

            case 35: return(Color.FromArgb(a, 249, 138, 138)); // (186, 125)

            case 36: return(Color.FromArgb(a, 252, 239, 166)); // (219, 125)

            case 37: return(Color.FromArgb(a, 240, 240, 240)); // (252, 125)

            case 38: return(Color.FromArgb(a, 45, 110, 185));  // (285, 125)

            case 39: return(Color.FromArgb(a, 154, 154, 154)); // (318, 125)

            case 40: return(Color.FromArgb(a, 77, 77, 77));    // (21, 158)

            case 41: return(Color.FromArgb(a, 240, 153, 153)); // (54, 158)

            case 42: return(Color.FromArgb(a, 101, 180, 212)); // (87, 158)

            case 43: return(Color.FromArgb(a, 171, 237, 171)); // (120, 158)

            case 44: return(Color.FromArgb(a, 255, 163, 87));  // (153, 158)

            case 45: return(Color.FromArgb(a, 240, 240, 240)); // (186, 158)

            case 46: return(Color.FromArgb(a, 235, 239, 30));  // (219, 158)

            case 47: return(Color.FromArgb(a, 255, 149, 14));  // (252, 158)

            case 48: return(Color.FromArgb(a, 246, 60, 161));  // (285, 158)

            case 49: return(Color.FromArgb(a, 221, 49, 49));   // (318, 158)

            case 50: return(Color.FromArgb(a, 100, 79, 142));  // (21, 190)

            case 51: return(Color.FromArgb(a, 255, 133, 85));  // (54, 190)

            case 52: return(Color.FromArgb(a, 57, 102, 57));   // (87, 190)

            case 53: return(Color.FromArgb(a, 174, 219, 242)); // (120, 190)

            case 54: return(Color.FromArgb(a, 47, 92, 115));   // (153, 190)

            case 55: return(Color.FromArgb(a, 155, 155, 155)); // (186, 190)

            case 56: return(Color.FromArgb(a, 126, 107, 41));  // (219, 190)

            case 57: return(Color.FromArgb(a, 93, 182, 229));  // (252, 190)

            case 58: return(Color.FromArgb(a, 50, 39, 71));    // (285, 190)

            case 59: return(Color.FromArgb(a, 224, 50, 50));   // (318, 190)

            case 60: return(Color.FromArgb(a, 240, 200, 80));  // (21, 223)

            case 61: return(Color.FromArgb(a, 203, 54, 148));  // (54, 223)

            case 62: return(Color.FromArgb(a, 205, 205, 205)); // (87, 223)

            case 63: return(Color.FromArgb(a, 29, 100, 153));  // (120, 223)

            case 64: return(Color.FromArgb(a, 214, 116, 15));  // (153, 223)

            case 65: return(Color.FromArgb(a, 135, 125, 142)); // (186, 223)

            case 66: return(Color.FromArgb(a, 240, 200, 80));  // (219, 223)

            case 67: return(Color.FromArgb(a, 93, 182, 229));  // (252, 223)

            case 68: return(Color.FromArgb(a, 93, 182, 229));  // (285, 223)

            case 69: return(Color.FromArgb(a, 114, 204, 114)); // (318, 223)

            case 70: return(Color.FromArgb(a, 240, 200, 80));  // (21, 255)

            case 71: return(Color.FromArgb(a, 240, 200, 80));  // (54, 255)

            case 72: return(Color.FromArgb(a, 133, 126, 109)); // (87, 255)

            case 73: return(Color.FromArgb(a, 240, 200, 80));  // (120, 255)

            case 74: return(Color.FromArgb(a, 93, 182, 229));  // (153, 255)

            case 75: return(Color.FromArgb(a, 224, 50, 50));   // (186, 255)

            case 76: return(Color.FromArgb(a, 112, 25, 25));   // (219, 255)

            case 77: return(Color.FromArgb(a, 93, 182, 229));  // (252, 255)

            case 78: return(Color.FromArgb(a, 47, 92, 115));   // (285, 255)

            case 79: return(Color.FromArgb(a, 158, 118, 103)); // (318, 255)

            case 80: return(Color.FromArgb(a, 131, 143, 137)); // (21, 288)

            case 81: return(Color.FromArgb(a, 240, 160, 0));   // (54, 288)

            case 82: return(Color.FromArgb(a, 159, 201, 166)); // (87, 288)

            case 83: return(Color.FromArgb(a, 164, 76, 242));  // (120, 288)

            case 84: return(Color.FromArgb(a, 93, 182, 229));  // (153, 288)

            case 85: return(Color.FromArgb(a, 127, 120, 103)); // (186, 288)

            case 86: return(Color.FromArgb(a, 127, 119, 103)); // (219, 288)

            case 87: return(Color.FromArgb(a, 126, 119, 102)); // (252, 288)

            case 88: return(Color.FromArgb(a, 126, 119, 102)); // (285, 288)

            case 89: return(Color.FromArgb(a, 126, 118, 102)); // (318, 288)
            }
        }
Exemple #23
0
        /// <summary>
        /// Constructs a new PlayerPed and sets all required properties
        /// </summary>
        /// <param name="userIndex">The UserIndex of this PlayerPed</param>
        /// <param name="characterHash">The PedHash off this PlayerPed</param>
        /// <param name="blipSprite">Any BlipSprite</param>
        /// <param name="blipColor">Any BlipColor</param>
        /// <param name="player1">The Player 1 Ped</param>
        /// <param name="input">InputManager instance</param>
        public PlayerPed(UserIndex userIndex, PedHash characterHash, BlipSprite blipSprite, BlipColor blipColor, Ped player1, InputManager input)
        {
            UserIndex     = userIndex;
            CharacterHash = characterHash;
            Player1       = player1;
            Input         = input;

            SetupPed();

            foreach (PlayerPedAction action in Enum.GetValues(typeof(PlayerPedAction)))
            {
                lastActions[action] = Game.GameTime;
            }

            switch (blipColor)
            {
            case BlipColor.White:
                MarkerColor = Color.White;
                break;

            case BlipColor.Red:
                MarkerColor = Color.Red;
                break;

            case BlipColor.Green:
                MarkerColor = Color.Green;
                break;

            case BlipColor.Blue:
                MarkerColor = Color.Blue;
                break;

            case BlipColor.Yellow:
                MarkerColor = Color.Yellow;
                break;

            default:
                MarkerColor = Color.OrangeRed;
                break;
            }

            UpdateBlip(blipSprite, blipColor);
        }
Exemple #24
0
 /// <summary>
 ///  This method will update this PlayerPed blip sprite and color
 /// </summary>
 /// <param name="sprite">new BlipSprite</param>
 /// <param name="color">new BlipColor</param>
 public void UpdateBlip(BlipSprite sprite, BlipColor color)
 {
     Ped.CurrentBlip.Remove();
     Ped.AddBlip().Sprite = sprite;
     Ped.CurrentBlip.Color = color;
 }
 public static void SetRouteColor(this Blip blip, BlipColor blipColor)
 {
     NativeFunction.Natives.SET_BLIP_ROUTE_COLOUR(blip, (int)blipColor);
 }