Ejemplo n.º 1
0
        public ZombiePed ZombieSpawn(Vector3 pos)
        {
            ZombiePed ped;
            int       maxZombies = Population.maxZombies;

            if (IsCityZone(Game.Player.Character.Position))
            {
                maxZombies = Population.maxZombies * 2;
            }
            if (((this.zombieCount >= maxZombies) || ((pos == Vector3.Zero) || (Extensions.DistanceBetweenV3(pos, this.startingLoc) < minSpawnDistance))) || (Extensions.DistanceBetweenV3(pos, Game.Player.Character.Position) < minSpawnDistance))
            {
                ped = null;
            }
            else
            {
                Ped ped;
                if (!customZombies)
                {
                    ped = World.CreateRandomPed(pos);
                }
                else
                {
                    Model model = new Model(RandoMath.GetRandomElementFromList <string>(ZombieModels));
                    ped = World.CreatePed(model, pos);
                }
                Infect(ped);
                ZombiePed objA = zombieList.Find(a => a.pedEntity == ped);
                ped = !ReferenceEquals(objA, null) ? objA : null;
            }
            return(ped);
        }
Ejemplo n.º 2
0
 public static void Sleep(Vector3 position)
 {
     if (World.GetNearbyPeds(position, 50f).Where <Ped>(new Func <Ped, bool>(Population.IsEnemy)).ToArray <Ped>().Any <Ped>())
     {
         UI.Notify("You cannot sleep here as there are ~r~hostiles~w~ nearby!");
     }
     else
     {
         TimeSpan span = World.CurrentDayTime + new TimeSpan(0, 8, 0, 0);
         Game.Player.Character.IsVisible      = false;
         Game.Player.CanControlCharacter      = false;
         Game.Player.Character.FreezePosition = true;
         Game.FadeScreenOut(0x7d0);
         Script.Wait(0x7d0);
         World.CurrentDayTime                 = span;
         Game.Player.Character.IsVisible      = true;
         Game.Player.CanControlCharacter      = true;
         Game.Player.Character.FreezePosition = false;
         Game.Player.Character.ClearBloodDamage();
         World.Weather = RandoMath.GetRandomElementFromArray <Weather>(Map.weathers);
         Character.currentEnergyLevel  = 1f;
         Character.currentHungerLevel -= 0.15f;
         Character.currentThirstLevel -= 0.25f;
         Script.Wait(0x7d0);
         Game.FadeScreenIn(0x7d0);
     }
 }
Ejemplo n.º 3
0
 public void Setup()
 {
     InputArgument[] arguments = new InputArgument[10];
     arguments[0] = -10000f;
     arguments[1] = -10000f;
     arguments[2] = -1000f;
     arguments[3] = 10000f;
     arguments[4] = 10000f;
     arguments[5] = 1000f;
     arguments[6] = 0;
     arguments[7] = 1;
     arguments[8] = 1;
     arguments[9] = 1;
     Function.Call(Hash._0x1B5C85C612E5256E, arguments);
     InputArgument[] argumentArray2 = new InputArgument[] { Game.Player.Character.Position.X, Game.Player.Character.Position.Y, Game.Player.Character.Position.Z, 1000f, false, false, false, false };
     Function.Call(Hash._0xA56F01F3765B93A0, argumentArray2);
     InputArgument[] argumentArray3 = new InputArgument[] { false };
     Function.Call(Hash._0x102E68B2024D536D, argumentArray3);
     InputArgument[] argumentArray4 = new InputArgument[] { false };
     Function.Call(Hash._0x84436EC293B1415F, argumentArray4);
     InputArgument[] argumentArray5 = new InputArgument[] { false };
     Function.Call(Hash._0x80D9F74197EA47D9, argumentArray5);
     InputArgument[] argumentArray6 = new InputArgument[] { false };
     Function.Call(Hash._0x2AFD795EEAC8D30D, argumentArray6);
     Function.Call(Hash._0x736A718577F39C7D, Array.Empty <InputArgument>());
     InputArgument[] argumentArray7 = new InputArgument[] { 0 };
     Function.Call(Hash._0x8C95333CFC3340F3, argumentArray7);
     InputArgument[] argumentArray8 = new InputArgument[] { 0 };
     Function.Call(Hash._0xCB9E1EB3BE2AF4E9, argumentArray8);
     InputArgument[] argumentArray9 = new InputArgument[] { false };
     Function.Call(Hash._0x608207E7A8FB787C, argumentArray9);
     InputArgument[] argumentArray10 = new InputArgument[] { 0 };
     Function.Call(Hash._0xCAA15F13EBD417FF, argumentArray10);
     InputArgument[] argumentArray11 = new InputArgument[] { false };
     Function.Call(Hash._0xF796359A959DF65D, argumentArray11);
     InputArgument[] argumentArray12 = new InputArgument[] { true };
     Function.Call(Hash._0xC9F98AC1884E73A2, argumentArray12);
     Ped[] allPeds = World.GetAllPeds();
     if (allPeds.Length != 0)
     {
         foreach (Ped ped in allPeds)
         {
             ped.Delete();
         }
     }
     Vehicle[] allVehicles = World.GetAllVehicles();
     if (allVehicles.Length != 0)
     {
         foreach (Vehicle vehicle in allVehicles)
         {
             vehicle.Delete();
         }
     }
     World.SetBlackout(true);
     World.TransitionToWeather(RandoMath.GetRandomElementFromArray <Weather>(weathers), 0f);
     InputArgument[] argumentArray13 = new InputArgument[] { 7, 0, 0 };
     Function.Call(Hash._0x47C3B5848C3E45D8, argumentArray13);
     InputArgument[] argumentArray14 = new InputArgument[] { 1, 1, 20 };
     Function.Call(Hash._0xB096419DF0D06CE7, argumentArray14);
 }
Ejemplo n.º 4
0
        public void PopulateVehicles()
        {
            int     maxVehicles;
            int     num2;
            Vector3 nextPositionOnStreet = new Vector3(0f, 0f, 0f);

            Vehicle[] allVehicles = World.GetAllVehicles();
            this.vehicleCount       = allVehicles.Length;
            this.vehPopRanThisFrame = false;
            this.vehPopTicksSinceLastUpdate++;
            if (this.vehPopRanThisFrame || (this.vehPopTicksSinceLastUpdate < this.vehPopTicksBetweenUpdates))
            {
                return;
            }
            else
            {
                maxVehicles = Population.maxVehicles;
                if (IsCityZone(Game.Player.Character.Position))
                {
                    maxVehicles = Population.maxVehicles * 2;
                }
                num2 = 0;
            }
            while (true)
            {
                while (true)
                {
                    if (num2 < maxVehicles)
                    {
                        Vector3 position = Game.Player.Character.Position;
                        nextPositionOnStreet = World.GetNextPositionOnStreet(position.Around((float)maxSpawnDistance), true);
                        Vector3 vector2 = nextPositionOnStreet.Around(5f);
                        if (!((vector2.IsOnScreen() || (Extensions.DistanceTo(Game.Player.Character, nextPositionOnStreet) < minSpawnDistance)) || IsSafeZone(vector2)))
                        {
                            try
                            {
                                this.VehicleSpawn(nextPositionOnStreet, RandoMath.RandomHeading());
                                this.vehPopTicksSinceLastUpdate = 0 - RandoMath.CachedRandom.Next(this.vehPopTicksBetweenUpdates / 3);
                                this.vehPopRanThisFrame         = true;
                            }
                            catch (Exception exception1)
                            {
                                Debug.Log(exception1.ToString());
                            }
                        }
                    }
                    else
                    {
                        return;
                    }
                    break;
                }
                num2++;
            }
        }
Ejemplo n.º 5
0
        public static Model GetRandomVehicleModel()
        {
            Model model = new Model();

            if (IsCityZone(Game.Player.Character.Position))
            {
                model = new Model(RandoMath.GetRandomElementFromList <string>(CityVehicleModels));
            }
            else
            {
                model = new Model(RandoMath.GetRandomElementFromList <string>(CountryVehicleModels));
            }
            return(model.Request(0x5dc) ? model : 0);
        }
Ejemplo n.º 6
0
        public void VehicleSpawn(Vector3 position, float heading)
        {
            int maxVehicles = Population.maxVehicles;

            if (IsCityZone(Game.Player.Character.Position))
            {
                maxVehicles = Population.maxVehicles * 2;
            }
            if (((this.vehicleCount < maxVehicles) && ((position != Vector3.Zero) && (Extensions.DistanceBetweenV3(position, this.startingLoc) >= minSpawnDistance))) && (Extensions.DistanceBetweenV3(position, Game.Player.Character.Position) >= minSpawnDistance))
            {
                Vehicle vehicle = Extensions.SpawnVehicle(GetRandomVehicleModel(), position, heading);
                vehicle.EngineHealth = (RandoMath.CachedRandom.Next(0, 100) > 10) ? 0f : 1000f;
                vehicle.DirtLevel    = 14f;
                VehicleDoor[] doors = vehicle.GetDoors();
                int           num3  = 0;
                while (true)
                {
                    if (num3 >= 5)
                    {
                        int item = 0;
                        while (true)
                        {
                            if (item >= 3)
                            {
                                break;
                            }
                            List <int>      theList   = new List <int>();
                            InputArgument[] arguments = new InputArgument[] { vehicle.Handle, item };
                            if (Function.Call <bool>(Hash._0x46E571A0E20D01F1, arguments))
                            {
                                theList.Add(item);
                            }
                            if (theList.Count > 0)
                            {
                                int             randomElementFromList = RandoMath.GetRandomElementFromList <int>(theList);
                                InputArgument[] argumentArray2        = new InputArgument[] { vehicle.Handle, randomElementFromList };
                                Function.Call(Hash._0x9E5B5E4D2CCD2259, argumentArray2);
                            }
                            item++;
                        }
                        break;
                    }
                    VehicleDoor randomElementFromArray = RandoMath.GetRandomElementFromArray <VehicleDoor>(doors);
                    vehicle.OpenDoor(randomElementFromArray, false, true);
                    num3++;
                }
            }
        }
Ejemplo n.º 7
0
 public void OnTick(object sender, EventArgs e)
 {
     if (Game.Player.Character.IsDead)
     {
         inventoryMenu.Visible     = false;
         craftCampfireMenu.Visible = false;
     }
     if (Main.ModActive)
     {
         Game.DisableControlThisFrame(2, GTA.Control.Phone);
         if (Game.IsDisabledControlJustPressed(2, GTA.Control.Phone) && !Main.MasterMenuPool.IsAnyMenuOpen())
         {
             inventoryMenu.Visible = !inventoryMenu.Visible;
         }
     }
     if (Main.ModActive && !Game.Player.Character.IsInVehicle())
     {
         try
         {
             Prop closest = World.GetClosest <Prop>(Game.Player.Character.Position, World.GetNearbyProps(Game.Player.Character.Position, 2.5f));
             if (closest == Character.tent)
             {
                 Extensions.DisplayHelpTextThisFrame("Press ~INPUT_CONTEXT~ to sleep in Tent");
                 Game.DisableControlThisFrame(2, GTA.Control.Context);
                 if (Game.IsDisabledControlJustPressed(2, GTA.Control.Context))
                 {
                     Population.Sleep(Game.Player.Character.Position);
                 }
             }
             else if (closest == Character.campFire)
             {
                 Extensions.DisplayHelpTextThisFrame("Press ~INPUT_CONTEXT~ to craft using Campfire");
                 Game.DisableControlThisFrame(2, GTA.Control.Context);
                 if (Game.IsDisabledControlJustPressed(2, GTA.Control.Context))
                 {
                     craftCampfireMenu.Visible = !craftCampfireMenu.Visible;
                 }
             }
             Game.Player.CanControlCharacter = !craftCampfireMenu.Visible;
             Ped ped = World.GetClosest <Ped>(Game.Player.Character.Position, World.GetNearbyPeds(Game.Player.Character, 1.5f));
             if (((ped == null) || (!ped.IsDead || !ped.IsHuman)) || this.lootedPeds.Contains(ped))
             {
                 if (((ped != null) && (ped.IsDead && !ped.IsHuman)) && !this.lootedPeds.Contains(ped))
                 {
                     Extensions.DisplayHelpTextThisFrame("Press ~INPUT_CONTEXT~ to harvest meat from animal corpse");
                     Game.DisableControlThisFrame(2, GTA.Control.Context);
                     if (Game.IsDisabledControlJustPressed(2, GTA.Control.Context))
                     {
                         if (!Game.Player.Character.Weapons.HasWeapon((WeaponHash)(-1716189206)))
                         {
                             UI.Notify("You need a knife to harvest ~b~Raw Meat~w~ from dead animals!", true);
                         }
                         else if (Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").Amount == Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").MaxAmount)
                         {
                             UI.Notify("You cannot carry any more ~b~Raw Meat~w~!", true);
                         }
                         else
                         {
                             Game.Player.Character.Weapons.Select((WeaponHash)(-1716189206), true);
                             Game.Player.Character.Task.PlayAnimation("pickup_object", "pickup_low", 8f, 0xbb8, AnimationFlags.None);
                             InventoryMaterial local7 = Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat");
                             local7.Amount++;
                             object[] objArray5 = new object[5];
                             objArray5[0] = "(";
                             objArray5[1] = Inventory.playerMaterialInventory.Find(item => item.Name == "Raw Meat").Amount;
                             object[] local10 = objArray5;
                             local10[2] = "/";
                             local10[3] = Inventory.playerMaterialInventory.Find(item => item.Name == "Raw Meat").MaxAmount;
                             object[] local12 = local10;
                             local12[4] = ")";
                             materialsSubMenu.MenuItems.Find(item => item.Text == "Raw Meat").SetRightLabel(string.Concat(local12));
                             craftCampfireMenu.MenuItems[0].SetRightLabel("(" + Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").Amount + ")");
                             object[] objArray6 = new object[5];
                             objArray6[0] = "You have harvested ~b~Raw Meat ~g~(";
                             objArray6[1] = Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").Amount;
                             object[] local15 = objArray6;
                             local15[2] = "/";
                             local15[3] = Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").MaxAmount;
                             object[] local17 = local15;
                             local17[4] = ")";
                             UI.Notify(string.Concat(local17), true);
                             this.lootedPeds.Add(ped);
                         }
                     }
                 }
             }
             else
             {
                 Extensions.DisplayHelpTextThisFrame("Press ~INPUT_CONTEXT~ to search corpse");
                 Game.DisableControlThisFrame(2, GTA.Control.Context);
                 if (Game.IsDisabledControlJustPressed(2, GTA.Control.Context))
                 {
                     Game.Player.Character.Task.PlayAnimation("pickup_object", "pickup_low");
                     int num = RandoMath.CachedRandom.Next(0, 10);
                     if (num < 3)
                     {
                         List <InventoryItem> playerItemInventory = Inventory.playerItemInventory;
                         int num4 = 0;
                         while (true)
                         {
                             if (num4 >= playerItemInventory.Count)
                             {
                                 InventoryItem itemFound = RandoMath.GetRandomElementFromList <InventoryItem>(playerItemInventory);
                                 if (Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).Amount == Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).MaxAmount)
                                 {
                                     UI.Notify("Found ~b~" + itemFound.Name + "~w~ but inventory is full!", true);
                                 }
                                 else
                                 {
                                     InventoryItem local1 = Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name);
                                     local1.Amount++;
                                     object[] objArray1 = new object[] { "Found ~b~", itemFound.Name, "~g~ (", Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).Amount, "/", Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).MaxAmount, ")" };
                                     UI.Notify(string.Concat(objArray1), true);
                                     this.lootedPeds.Add(ped);
                                     object[] objArray2 = new object[] { "(", Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).Amount, "/", Inventory.playerItemInventory.Find(item => item.Name == itemFound.Name).MaxAmount, ")" };
                                     itemsSubMenu.MenuItems.Find(item => item.Text == itemFound.Name).SetRightLabel(string.Concat(objArray2));
                                 }
                                 break;
                             }
                             if (playerItemInventory[num4].GetType() == typeof(InventoryCraftableFoodItem))
                             {
                                 playerItemInventory.Remove(playerItemInventory[num4]);
                             }
                             num4++;
                         }
                     }
                     else if (num <= 5)
                     {
                         UI.Notify("Found nothing", true);
                         this.lootedPeds.Add(ped);
                     }
                     else
                     {
                         List <InventoryMaterial> playerMaterialInventory = Inventory.playerMaterialInventory;
                         int num8 = 0;
                         while (true)
                         {
                             if (num8 >= playerMaterialInventory.Count)
                             {
                                 InventoryItem materialFound = RandoMath.GetRandomElementFromList <InventoryMaterial>(playerMaterialInventory);
                                 if (Inventory.playerMaterialInventory.Find(material => material.Name == materialFound.Name).Amount == Inventory.playerMaterialInventory.Find(material => material.Name == materialFound.Name).MaxAmount)
                                 {
                                     UI.Notify("Found ~b~" + materialFound.Name + "~w~ but inventory is full!", true);
                                 }
                                 else
                                 {
                                     InventoryMaterial local2 = Inventory.playerMaterialInventory.Find(material => material.Name == materialFound.Name);
                                     local2.Amount++;
                                     object[] objArray3 = new object[] { "Found ~b~", materialFound.Name, "~g~ (", Inventory.playerMaterialInventory.Find(material => material.Name == materialFound.Name).Amount, "/", Inventory.playerMaterialInventory.Find(material => material.Name == materialFound.Name).MaxAmount, ")" };
                                     UI.Notify(string.Concat(objArray3), true);
                                     this.lootedPeds.Add(ped);
                                     object[] objArray4 = new object[] { "(", Inventory.playerMaterialInventory.Find(item => item.Name == materialFound.Name).Amount, "/", Inventory.playerMaterialInventory.Find(item => item.Name == materialFound.Name).MaxAmount, ")" };
                                     materialsSubMenu.MenuItems.Find(item => item.Text == materialFound.Name).SetRightLabel(string.Concat(objArray4));
                                     craftCampfireMenu.MenuItems.Find(item => item.Text == materialFound.Name).SetRightLabel("(" + Inventory.playerMaterialInventory.Find(material => material.Name == "Raw Meat").Amount + ")");
                                 }
                                 break;
                             }
                             if ((playerMaterialInventory[num8].GetType() == typeof(InventoryCraftableMaterial)) || (playerMaterialInventory[num8].Name == "Raw Meat"))
                             {
                                 playerMaterialInventory.Remove(playerMaterialInventory[num8]);
                             }
                             num8++;
                         }
                     }
                 }
             }
         }
         catch (Exception exception1)
         {
             Debug.Log(exception1.ToString());
         }
     }
 }
Ejemplo n.º 8
0
        public static SurvivorPed SurvivorSpawn(Vector3 pos)
        {
            Ped ped;

            if (!customSurvivors)
            {
                ped = World.CreateRandomPed(pos.Around(5f));
            }
            else
            {
                Model model = new Model(RandoMath.GetRandomElementFromList <string>(SurvivorModels));
                ped = World.CreatePed(model, pos.Around(5f));
            }
            InputArgument[] arguments = new InputArgument[] { ped.Handle, 0, 0 };
            Function.Call(Hash._0x70A2D1137C8ED7C9, arguments);
            InputArgument[] argumentArray2 = new InputArgument[] { ped.Handle, true };
            Function.Call(Hash._0x8E06A6FE76C9EFF4, argumentArray2);
            InputArgument[] argumentArray3 = new InputArgument[] { ped.Handle, true };
            Function.Call(Hash._0x77A5B103C87F476E, argumentArray3);
            InputArgument[] argumentArray4 = new InputArgument[] { ped.Handle, true };
            Function.Call(Hash._0x6B7A646C242A7059, argumentArray4);
            ped.DiesInstantlyInWater = false;
            InputArgument[] argumentArray5 = new InputArgument[] { ped.Handle, 1, true };
            Function.Call(Hash._0x4D9CA1009AFBD057, argumentArray5);
            int num = RandoMath.CachedRandom.Next(0, 11);

            ped.MaxHealth = 100;
            ped.Health    = ped.MaxHealth;
            ped.Armor     = 70;
            if (num < 5)
            {
                ped.Weapons.Give(WeaponHash.SMG, 300, true, true);
                ped.Weapons.Give(WeaponHash.Pistol, 120, true, true);
                ped.Weapons.Give((WeaponHash)(-1716189206), 0, false, true);
            }
            if (num >= 5)
            {
                ped.Weapons.Give((WeaponHash)(-1074790547), 300, true, true);
                ped.Weapons.Give(WeaponHash.CombatPistol, 120, true, true);
                ped.Weapons.Give((WeaponHash)(-853065399), 0, false, true);
            }
            ped.Money            = 0;
            ped.NeverLeavesGroup = true;
            SurvivorPed item = new SurvivorPed(ped);
            bool        flag = false;
            int         num2 = 0;

            while (true)
            {
                if (num2 < survivorList.Count)
                {
                    if (survivorList[num2].pedEntity != null)
                    {
                        num2++;
                        continue;
                    }
                    survivorList[num2].AttachData(ped);
                    item = survivorList[num2];
                    flag = true;
                }
                if (!flag)
                {
                    survivorList.Add(item);
                }
                else
                {
                    UI.Notify("Survivor not added to list");
                }
                return(item);
            }
        }
Ejemplo n.º 9
0
        public void PopulateAnimals()
        {
            int     maxAnimals;
            int     num2;
            Vector3 vector = new Vector3(0f, 0f, 0f);

            this.animalCount        = animalList.Count;
            this.aniPopRanThisFrame = false;
            this.aniPopTicksSinceLastUpdate++;
            if (this.aniPopRanThisFrame || (this.aniPopTicksSinceLastUpdate < this.aniPopTicksBetweenUpdates))
            {
                return;
            }
            else
            {
                maxAnimals = Population.maxAnimals;
                if (IsCityZone(Game.Player.Character.Position))
                {
                    maxAnimals = Population.maxAnimals * 2;
                }
                num2 = 0;
            }
            while (true)
            {
                while (true)
                {
                    if (num2 < maxAnimals)
                    {
                        int  num3  = RandoMath.CachedRandom.Next(1, 0x65);
                        bool flag4 = num3 <= 40;
                        vector = !flag4?World.GetNextPositionOnSidewalk(Game.Player.Character.Position.Around((float)maxSpawnDistance)) : World.GetNextPositionOnStreet(Game.Player.Character.Position.Around((float)maxSpawnDistance), true);

                        Vector3 vector2 = vector.Around(5f);
                        if (!((vector2.IsOnScreen() || (Extensions.DistanceTo(Game.Player.Character, vector) < minSpawnDistance)) || IsSafeZone(vector2)))
                        {
                            try
                            {
                                if (this.animalCount < maxAnimals)
                                {
                                    Model model;
                                    if (IsCityZone(vector))
                                    {
                                        model = new Model(RandoMath.GetRandomElementFromList <string>(CityAnimalModels));
                                    }
                                    else
                                    {
                                        model = new Model(RandoMath.GetRandomElementFromList <string>(CountryAnimalModels));
                                    }
                                    Ped item = World.CreatePed(model, vector);
                                    item.RelationshipGroup = Relationships.AnimalGroup;
                                    item.Task.WanderAround();
                                    animalList.Add(item);
                                    this.aniPopTicksSinceLastUpdate = 0 - RandoMath.CachedRandom.Next(this.aniPopTicksBetweenUpdates / 3);
                                    this.aniPopRanThisFrame         = true;
                                }
                            }
                            catch (Exception exception1)
                            {
                                Debug.Log(exception1.ToString());
                            }
                        }
                    }
                    else
                    {
                        return;
                    }
                    break;
                }
                num2++;
            }
        }
Ejemplo n.º 10
0
        public void Setup()
        {
            this.playerOldMaxWantedLevel = Game.MaxWantedLevel;
            this.playerOldMoney          = Game.Player.Money;
            this.playerOldPosition       = Game.Player.Character.Position;
            this.playerOldHeading        = Game.Player.Character.Heading;
            this.playerOldModel          = Game.Player.Character.Model;
            this.playerOldWeapons        = Game.Player.Character.Weapons;
            Game.MaxWantedLevel          = 0;
            Game.Player.WantedLevel      = 0;
            Game.Player.Money            = 0;
            PedHash[] hashArray  = new PedHash[] { PedHash.FreemodeMale01 };
            PedHash[] hashArray2 = new PedHash[] { (PedHash)(-1667301416) };
            PedHash[] theArray   = (playerGender != Gender.Male) ? hashArray2 : hashArray;
            Model     model      = new Model(RandoMath.GetRandomElementFromArray <PedHash>(theArray));

            model.Request(500);
            if (model.IsInCdImage && model.IsValid)
            {
                while (true)
                {
                    if (model.IsLoaded)
                    {
                        InputArgument[] arguments = new InputArgument[] { Game.Player, model.Hash };
                        Function.Call(Hash._0x00A1CADD00108836, arguments);
                        if (playerGender != Gender.Male)
                        {
                            InputArgument[] argumentArray15 = new InputArgument[11];
                            argumentArray15[0]  = Game.Player.Character.Handle;
                            argumentArray15[1]  = 0x21;
                            argumentArray15[2]  = 0x21;
                            argumentArray15[3]  = 0;
                            argumentArray15[4]  = 0x21;
                            argumentArray15[5]  = 0x21;
                            argumentArray15[6]  = 0;
                            argumentArray15[7]  = 1f;
                            argumentArray15[8]  = 1f;
                            argumentArray15[9]  = 0f;
                            argumentArray15[10] = true;
                            Function.Call(Hash._0x9414E18B9434C2FE, argumentArray15);
                            InputArgument[] argumentArray16 = new InputArgument[] { Game.Player.Character.Handle, 2, 4, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray16);
                            InputArgument[] argumentArray17 = new InputArgument[] { Game.Player.Character.Handle, 11, 0xf3, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray17);
                            InputArgument[] argumentArray18 = new InputArgument[] { Game.Player.Character.Handle, 3, 7, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray18);
                            InputArgument[] argumentArray19 = new InputArgument[] { Game.Player.Character.Handle, 8, 0, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray19);
                            InputArgument[] argumentArray20 = new InputArgument[] { Game.Player.Character.Handle, 6, 0x18, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray20);
                            InputArgument[] argumentArray21 = new InputArgument[] { Game.Player.Character.Handle, 4, 0x54, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray21);
                            InputArgument[] argumentArray22 = new InputArgument[] { Game.Player.Character.Handle, 11, 11 };
                            Function.Call(Hash._0x4CFFC65454C93A49, argumentArray22);
                            InputArgument[] argumentArray23 = new InputArgument[] { Game.Player.Character.Handle, 3 };
                            Function.Call(Hash._0x50B56988B170AFDF, argumentArray23);
                            InputArgument[] argumentArray24 = new InputArgument[] { Game.Player.Character.Handle, 2, 1, 1f };
                            Function.Call(Hash._0x48F44967FA05CC1E, argumentArray24);
                            InputArgument[] argumentArray25 = new InputArgument[] { Game.Player.Character.Handle, 2, 1, 11, 11 };
                            Function.Call(Hash._0x497BF74A7B9CB952, argumentArray25);
                        }
                        else
                        {
                            InputArgument[] argumentArray2 = new InputArgument[11];
                            argumentArray2[0]  = Game.Player.Character.Handle;
                            argumentArray2[1]  = 0x2c;
                            argumentArray2[2]  = 0x2c;
                            argumentArray2[3]  = 0;
                            argumentArray2[4]  = 0x2c;
                            argumentArray2[5]  = 0x2c;
                            argumentArray2[6]  = 0;
                            argumentArray2[7]  = 1f;
                            argumentArray2[8]  = 1f;
                            argumentArray2[9]  = 0f;
                            argumentArray2[10] = true;
                            Function.Call(Hash._0x9414E18B9434C2FE, argumentArray2);
                            InputArgument[] argumentArray3 = new InputArgument[] { Game.Player.Character.Handle, 3, 12, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray3);
                            InputArgument[] argumentArray4 = new InputArgument[] { Game.Player.Character.Handle, 4, 1, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray4);
                            InputArgument[] argumentArray5 = new InputArgument[] { Game.Player.Character.Handle, 8, 0, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray5);
                            InputArgument[] argumentArray6 = new InputArgument[] { Game.Player.Character.Handle, 11, 0xe9, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray6);
                            InputArgument[] argumentArray7 = new InputArgument[] { Game.Player.Character.Handle, 6, 0x18, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray7);
                            InputArgument[] argumentArray8 = new InputArgument[] { Game.Player.Character.Handle, 2, 12, 0, 0 };
                            Function.Call(Hash._0x262B14F48D29DE80, argumentArray8);
                            InputArgument[] argumentArray9 = new InputArgument[] { Game.Player.Character.Handle, 0x39, 0x3a };
                            Function.Call(Hash._0x4CFFC65454C93A49, argumentArray9);
                            InputArgument[] argumentArray10 = new InputArgument[] { Game.Player.Character.Handle, 3 };
                            Function.Call(Hash._0x50B56988B170AFDF, argumentArray10);
                            InputArgument[] argumentArray11 = new InputArgument[] { Game.Player.Character.Handle, 1, 0, 1f };
                            Function.Call(Hash._0x48F44967FA05CC1E, argumentArray11);
                            InputArgument[] argumentArray12 = new InputArgument[] { Game.Player.Character.Handle, 2, 1, 1f };
                            Function.Call(Hash._0x48F44967FA05CC1E, argumentArray12);
                            InputArgument[] argumentArray13 = new InputArgument[] { Game.Player.Character.Handle, 1, 1, 0x39, 0x3a };
                            Function.Call(Hash._0x497BF74A7B9CB952, argumentArray13);
                            InputArgument[] argumentArray14 = new InputArgument[] { Game.Player.Character.Handle, 2, 1, 0x39, 0x3a };
                            Function.Call(Hash._0x497BF74A7B9CB952, argumentArray14);
                        }
                        break;
                    }
                    Script.Wait(100);
                }
            }
            model.MarkAsNoLongerNeeded();
            Game.Player.Money = 0;
            Game.Player.Character.Position = new Vector3(478.8616f, -921.53f, 38.77953f);
            Game.Player.Character.Heading  = 266f;
            Model model2 = new Model("prop_beach_fire");

            model2.Request(250);
            if (model2.IsInCdImage && model2.IsValid)
            {
                while (true)
                {
                    if (model2.IsLoaded)
                    {
                        Vector3 position = new Vector3(482.3683f, -921.3369f, 37.2f);
                        campFire = World.CreateProp(model2, position, true, false);
                        break;
                    }
                    Script.Wait(50);
                }
            }
            model2.MarkAsNoLongerNeeded();
            campFire.AddBlip();
            campFire.CurrentBlip.Sprite = BlipSprite.HotProperty;
            campFire.CurrentBlip.Color  = BlipColor.Yellow;
            campFire.CurrentBlip.Name   = "Campfire";
            Model model3 = new Model("prop_skid_tent_01");

            model3.Request(250);
            if (model3.IsInCdImage && model3.IsValid)
            {
                while (true)
                {
                    if (model3.IsLoaded)
                    {
                        Vector3 position = new Vector3(478.2682f, -925.3043f, 36.8f);
                        tent         = World.CreateProp(model3, position, true, false);
                        tent.Heading = 135f;
                        break;
                    }
                    Script.Wait(50);
                }
            }
            model3.MarkAsNoLongerNeeded();
            tent.AddBlip();
            tent.CurrentBlip.Sprite = BlipSprite.CaptureHouse;
            tent.CurrentBlip.Color  = BlipColor.Blue;
            tent.CurrentBlip.Name   = "Tent";
            Model model4 = new Model("prop_const_fence02a");

            model4.Request(250);
            if (model4.IsInCdImage && model4.IsValid)
            {
                while (true)
                {
                    if (model4.IsLoaded)
                    {
                        Vector3 position = new Vector3(418.9457f, -890.5727f, 28.4f);
                        barrier         = World.CreateProp(model4, position, true, false);
                        barrier.Heading = 270f;
                        break;
                    }
                    Script.Wait(50);
                }
            }
            model4.MarkAsNoLongerNeeded();
            Model model5 = new Model("prop_dumpster_02a");

            model5.Request(250);
            if (model5.IsInCdImage && model5.IsValid)
            {
                while (true)
                {
                    if (model5.IsLoaded)
                    {
                        Vector3 position = new Vector3(459.4905f, -933.745f, 31.2f);
                        dumpster         = World.CreateProp(model5, position, true, false);
                        dumpster.Heading = 270f;
                        break;
                    }
                    Script.Wait(50);
                }
            }
            model5.MarkAsNoLongerNeeded();
            this.ResetCharacter();
        }