Beispiel #1
1
 public static void PlayAnimation(Ped mPed, string animSet, string animName, float speed, int duration, [MarshalAs(UnmanagedType.U1)] bool lastAnimation, float playbackRate)
 {
     var inputArgumentArray1 = new InputArgument[1];
     InputArgument inputArgument1 = new InputArgument(animSet);
     inputArgumentArray1[0] = inputArgument1;
     Function.Call(Hash.REQUEST_ANIM_DICT, inputArgumentArray1);
     DateTime dateTime = DateTime.Now + new TimeSpan(0, 0, 0, 0, 1000);
     InputArgument[] inputArgumentArray2 = new InputArgument[1];
     InputArgument inputArgument2 = new InputArgument(animSet);
     inputArgumentArray2[0] = inputArgument2;
     if (!Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, inputArgumentArray2))
     {
         InputArgument[] inputArgumentArray3;
         do
         {
             Script.Yield();
             if (!(DateTime.Now >= dateTime))
             {
                 inputArgumentArray3 = new InputArgument[1];
                 InputArgument inputArgument3 = new InputArgument(animSet);
                 inputArgumentArray3[0] = inputArgument3;
             }
             else
                 goto label_4;
         }
         while (!Function.Call<bool>(Hash.HAS_ANIM_DICT_LOADED, inputArgumentArray3));
         goto label_3;
     label_4:
         return;
     }
     label_3:
     var inputArgumentArray4 = new InputArgument[11];
     var inputArgument4 = new InputArgument(mPed.Handle);
     inputArgumentArray4[0] = inputArgument4;
     var inputArgument5 = new InputArgument(animSet);
     inputArgumentArray4[1] = inputArgument5;
     var inputArgument6 = new InputArgument(animName);
     inputArgumentArray4[2] = inputArgument6;
     var inputArgument7 = new InputArgument(speed);
     inputArgumentArray4[3] = inputArgument7;
     var inputArgument8 = new InputArgument(-8.0f);
     inputArgumentArray4[4] = inputArgument8;
     var inputArgument9 = new InputArgument(duration);
     inputArgumentArray4[5] = inputArgument9;
     var inputArgument10 = new InputArgument(48);
     inputArgumentArray4[6] = inputArgument10;
     InputArgument inputArgument11 = new InputArgument(playbackRate);
     inputArgumentArray4[7] = inputArgument11;
     InputArgument inputArgument12 = new InputArgument(0);
     inputArgumentArray4[8] = inputArgument12;
     InputArgument inputArgument13 = new InputArgument(0);
     inputArgumentArray4[9] = inputArgument13;
     InputArgument inputArgument14 = new InputArgument(0);
     inputArgumentArray4[10] = inputArgument14;
     Function.Call(Hash.TASK_PLAY_ANIM, inputArgumentArray4);
 }
 private void InternalDraw(SizeF offset, float screenWidth, float screenHeight)
 {
     if (this.Enabled)
     {
         InputArgument[] arguments = new InputArgument[] { this._textureDict };
         if (Function.Call <bool>(Hash.HAS_STREAMED_TEXTURE_DICT_LOADED, arguments))
         {
             float num4 = this.Size.Width / screenWidth;
             float num3 = this.Size.Height / screenHeight;
             float num2 = (this.Position.X + offset.Width) / screenWidth;
             float num  = (this.Position.Y + offset.Height) / screenHeight;
             if (!this.Centered)
             {
                 num2 += num4 * 0.5f;
                 num  += num3 * 0.5f;
             }
             InputArgument[] argumentArray2 = new InputArgument[11];
             argumentArray2[0]  = this._textureDict;
             argumentArray2[1]  = this._textureName;
             argumentArray2[2]  = num2;
             argumentArray2[3]  = num;
             argumentArray2[4]  = num4;
             argumentArray2[5]  = num3;
             argumentArray2[6]  = this.Rotation;
             argumentArray2[7]  = this.Color.R;
             argumentArray2[8]  = this.Color.G;
             argumentArray2[9]  = this.Color.B;
             argumentArray2[10] = this.Color.A;
             Function.Call(Hash.DRAW_SPRITE, argumentArray2);
         }
     }
 }
        public static void DisplayHelpTextThisFrame(string helpText, bool ignoreMenus = false)
        {
            if (!ignoreMenus && MenuConrtoller.MenuPool.IsAnyMenuOpen())
            {
                return;
            }
            Function.Call((Hash) - 8860350453193909743L, new InputArgument[1]
            {
                InputArgument.op_Implicit("CELL_EMAIL_BCON")
            });
            int startIndex = 0;

            while (startIndex < helpText.Length)
            {
                Function.Call((Hash)7789129354908300458L, new InputArgument[1]
                {
                    InputArgument.op_Implicit(helpText.Substring(startIndex, Math.Min(99, helpText.Length - startIndex)))
                });
                startIndex += 99;
            }
            Function.Call((Hash)2562546386151446694L, new InputArgument[4]
            {
                InputArgument.op_Implicit(0),
                InputArgument.op_Implicit(0),
                InputArgument.op_Implicit(Function.Call <bool>((Hash)5582567543607241831L, new InputArgument[0]) != null ? 0 : 1),
                InputArgument.op_Implicit(-1)
            });
        }
Beispiel #4
0
 public bool Exists()
 {
     return((bool)Function.Call <bool>((GTA.Native.Hash) 8230805619690780346L, new InputArgument[1]
     {
         InputArgument.op_Implicit(this.Handle)
     }));
 }
Beispiel #5
0
 public bool Exists()
 {
     return((bool)Function.Call <bool>((Hash)8408201869211353243L, new InputArgument[1]
     {
         InputArgument.op_Implicit(this.Handle)
     }));
 }
 public static bool IsUsingAnyScenario(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)6317224474499895619L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
 public static void RemoveElegantly(this Ped ped)
 {
     Function.Call((Hash) - 6022081966519748258L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     });
 }
 public static bool GetStealthMovement(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)8947185480862490559L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
Beispiel #9
0
        public void Revert()
        {
            Game.MaxWantedLevel = this.playerOldMaxWantedLevel;
            Game.Player.Money   = 0;
            Model model = new Model(this.playerOldModel.Hash);

            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);
                        InputArgument[] argumentArray2 = new InputArgument[] { Game.Player.Character.Handle };
                        Function.Call(Hash._0x45EEE61580806D63, argumentArray2);
                        break;
                    }
                    Script.Wait(100);
                }
            }
            model.MarkAsNoLongerNeeded();
            Game.Player.Money = this.playerOldMoney;
            Game.Player.Character.Position = this.playerOldPosition;
            Game.Player.Character.Heading  = this.playerOldHeading;
            campFire.Delete();
        }
 public static void SetParkedVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash) - 1520285072926450915L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void SetFrontendRadioActive(bool active)
 {
     Function.Call((Hash) - 580282179644691528L, new InputArgument[1]
     {
         InputArgument.op_Implicit(active ? 1 : 0)
     });
 }
 public static void RemoveAllShockingEvents(bool toggle)
 {
     Function.Call((Hash) - 1536878670296045748L, new InputArgument[1]
     {
         InputArgument.op_Implicit(toggle ? 1 : 0)
     });
 }
 public static void SetScenarioPedDensityThisMultiplierFrame(float multiplier)
 {
     Function.Call((Hash)8815058788752046232L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void SetPedDensityThisMultiplierFrame(float multiplier)
 {
     Function.Call((Hash) - 7646032285877768974L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
 public static void SetRandomVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash) - 5497991812566059053L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }
Beispiel #16
0
    private void draw3DRadar()
    {
        if ((long)Environment.TickCount >= this.lastTimeGetAllVehicles + this.getAllVehiclesInterval)
        {
            if (this.vehicles != null)
            {
                Array.Clear((Array)this.vehicles, 0, this.vehicles.Length);
            }
            this.vehicles = Array.FindAll <Vehicle>(World.GetAllVehicles(), (Predicate <Vehicle>)(v =>
            {
                Model model1 = ((Entity)v).get_Model();
                if (!((Model) ref model1).get_IsPlane())
                {
                    Model model2 = ((Entity)v).get_Model();
                    if (!((Model) ref model2).get_IsHelicopter())
                    {
                        Model model3 = ((Entity)v).get_Model();
                        if (!((Model) ref model3).get_IsCargobob())
                        {
                            goto label_5;
                        }
                    }
                }
                if (Entity.op_Inequality((Entity)v, (Entity)this.Aircraft))
                {
                    Vector3 position = ((Entity)v).get_Position();
                    return((double)((Vector3) ref position).DistanceTo(((Entity)this.Aircraft).get_Position()) <= (double)this.blipRadius);
                }
                label_5:
                return(false);
            }));
            this.lastTimeGetAllVehicles = (long)Environment.TickCount;
        }
        int num1 = 1;

        foreach (Vehicle vehicle in this.vehicles)
        {
            if (Entity.op_Inequality((Entity)vehicle, (Entity)this.Aircraft) && vehicle.get_IsDriveable() && ((Entity)vehicle).get_IsOnScreen())
            {
                if (Function.Call <bool>((Hash) - 225189090236849748L, new InputArgument[3]
                {
                    InputArgument.op_Implicit(vehicle),
                    InputArgument.op_Implicit(this.Aircraft),
                    InputArgument.op_Implicit(17)
                }) != null && !((Entity)vehicle).get_IsOccluded())
                {
                    Point screen = UI.WorldToScreen(((Entity)vehicle).get_Position());
                    float xpos   = (float)screen.X / (float)UI.WIDTH;
                    float num2   = (float)screen.Y / (float)UI.HEIGHT;
                    if (screen.X != 0 && screen.Y != 0)
                    {
                        UI.DrawTexture("scripts//Jet_HUD//Rectangle.png", num1, 1, 100, UI.WorldToScreen(((Entity)vehicle).get_Position()), new PointF(0.5f, 0.5f), new Size(this.correctedWidth, 30), 0.0f, this.color_HUD);
                        ++num1;
                        Vector3 position = ((Entity)vehicle).get_Position();
                        this.drawString2("\nDST: " + ((Vector3) ref position).DistanceTo(((Entity)this.Aircraft).get_Position()).ToString("0"), xpos, num2 - 0.085f, 0.5f, this.color_HUD, true);
                    }
                }
            }
        }
    }
Beispiel #17
0
 public override bool Start()
 {
     base.Stop();
     if (base._asset.SetNextCall())
     {
         InputArgument[] arguments = new InputArgument[12];
         arguments[0]  = base._effectName;
         arguments[1]  = base.Offset.X;
         arguments[2]  = base.Offset.Y;
         arguments[3]  = base.Offset.Z;
         arguments[4]  = base.Rotation.X;
         arguments[5]  = base.Rotation.Y;
         arguments[6]  = base.Rotation.Z;
         arguments[7]  = base.Scale;
         arguments[8]  = base.InvertAxis.HasFlag(InvertAxis.X);
         arguments[9]  = base.InvertAxis.HasFlag(InvertAxis.Y);
         arguments[10] = base.InvertAxis.HasFlag(InvertAxis.Z);
         arguments[11] = false;
         base.Handle   = Function.Call <int>(Hash.START_PARTICLE_FX_LOOPED_AT_COORD, arguments);
         if (base.IsActive)
         {
             return(true);
         }
         base.Handle = -1;
     }
     return(false);
 }
 public static void SetMovementAnimSet(this Ped ped, string animation)
 {
     if (Entity.op_Equality((Entity)ped, (Entity)null))
     {
         return;
     }
     while (true)
     {
         if (Function.Call <bool>((Hash) - 4257582536886376016L, new InputArgument[1]
         {
             InputArgument.op_Implicit(animation)
         }) == 0)
         {
             Function.Call((Hash)7972635428772450029L, new InputArgument[1]
             {
                 InputArgument.op_Implicit(animation)
             });
             Script.Yield();
         }
         else
         {
             break;
         }
     }
     Function.Call((Hash) - 5797657820774978577L, new InputArgument[3]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(animation),
         InputArgument.op_Implicit(1048576000)
     });
 }
Beispiel #19
0
 public void SendTo(Ped target, int duration)
 {
     target.CanRagdoll ??= true;
     InputArgument[] arguments = new InputArgument[] { target.Handle, 0x2710, duration, 1, 1, 1, 0 };
     Function.Call(Hash.SET_PED_TO_RAGDOLL, arguments);
     this.SendTo(target);
 }
 public static bool IsAmbientSpeechPlaying(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash) - 8038141706915823699L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
Beispiel #21
0
        public unsafe Entity GetTargetedEntity()
        {
            int num;

            InputArgument[] arguments = new InputArgument[] { this.Handle, (IntPtr) & num };
            return(!Function.Call <bool>(Hash.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT, arguments) ? null : Entity.FromHandle(num));
        }
 public static bool IsCurrentWeaponSileced(this Ped ped)
 {
     return((bool)Function.Call <bool>((Hash)7345588343449861831L, new InputArgument[1]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle())
     }));
 }
Beispiel #23
0
        public override unsafe bool Exists()
        {
            int handle = base.Handle;

            InputArgument[] arguments = new InputArgument[] { (IntPtr) & handle };
            return(Function.Call <bool>(Hash.DOES_ROPE_EXIST, arguments));
        }
Beispiel #24
0
        public void PlayAnimation(string animDict, string animName, float blendInSpeed, float blendOutSpeed, int duration, AnimationFlags flags, float playbackRate)
        {
            InputArgument[] arguments = new InputArgument[] { animDict };
            Function.Call(Hash.REQUEST_ANIM_DICT, arguments);
            DateTime time = DateTime.UtcNow + new TimeSpan(0, 0, 0, 0, 0x3e8);

            while (true)
            {
                InputArgument[] argumentArray2 = new InputArgument[] { animDict };
                if (Function.Call <bool>(Hash.HAS_ANIM_DICT_LOADED, argumentArray2))
                {
                    InputArgument[] argumentArray3 = new InputArgument[11];
                    argumentArray3[0]  = this._ped.Handle;
                    argumentArray3[1]  = animDict;
                    argumentArray3[2]  = animName;
                    argumentArray3[3]  = blendInSpeed;
                    argumentArray3[4]  = blendOutSpeed;
                    argumentArray3[5]  = duration;
                    argumentArray3[6]  = flags;
                    argumentArray3[7]  = playbackRate;
                    argumentArray3[8]  = 0;
                    argumentArray3[9]  = 0;
                    argumentArray3[10] = 0;
                    Function.Call(Hash.TASK_PLAY_ANIM, argumentArray3);
                    return;
                }
                Script.Yield();
                if (DateTime.UtcNow >= time)
                {
                    return;
                }
            }
        }
Beispiel #25
0
 public static void Recruit(this Ped ped, Ped leader)
 {
     if (leader != null)
     {
         PedGroup currentPedGroup = leader.CurrentPedGroup;
         ped.LeaveGroup();
         InputArgument[] arguments = new InputArgument[] { ped.Handle, false };
         Function.Call(Hash._0xF0A4F1BBF4FA7497, arguments);
         ped.Task.ClearAll();
         currentPedGroup.SeparationRange = 2.147484E+09f;
         if (!currentPedGroup.Contains(leader))
         {
             currentPedGroup.Add(leader, true);
         }
         if (!currentPedGroup.Contains(ped))
         {
             currentPedGroup.Add(ped, false);
         }
         ped.IsPersistent      = true;
         ped.RelationshipGroup = leader.RelationshipGroup;
         ped.NeverLeavesGroup  = true;
         Blip currentBlip = ped.CurrentBlip;
         if (currentBlip.Type != 0)
         {
             currentBlip.Remove();
         }
         Blip blip2 = ped.AddBlip();
         blip2.Color = BlipColor.Green;
         blip2.Scale = 0.65f;
         blip2.Name  = "Group";
         PlayerGroup.SetPedTasks(ped, PedTasks.Follow);
     }
 }
 private static void AddKit(Vehicle vehicle, VehicleData data)
 {
     if (data == null || Entity.op_Equality((Entity)vehicle, (Entity)null))
     {
         return;
     }
     vehicle.InstallModKit();
     VehicleNeonLight[] neonLights = data.NeonLights;
     if (neonLights != null)
     {
         ((IEnumerable <VehicleNeonLight>)neonLights).ToList <VehicleNeonLight>().ForEach((Action <VehicleNeonLight>)(h => vehicle.SetNeonLightsOn(h, true)));
     }
     data.Mods?.ForEach((Action <Tuple <VehicleMod, int> >)(m => vehicle.SetMod(m.get_Item1(), m.get_Item2(), true)));
     VehicleToggleMod[] toggleMods = data.ToggleMods;
     if (toggleMods != null)
     {
         ((IEnumerable <VehicleToggleMod>)toggleMods).ToList <VehicleToggleMod>().ForEach((Action <VehicleToggleMod>)(h => vehicle.ToggleMod(h, true)));
     }
     vehicle.set_WindowTint(data.WindowTint);
     vehicle.set_WheelType(data.WheelType);
     vehicle.set_NeonLightsColor(data.NeonColor);
     Function.Call((Hash)6971396915951620534L, new InputArgument[2]
     {
         InputArgument.op_Implicit(((Entity)vehicle).get_Handle()),
         InputArgument.op_Implicit(data.Livery)
     });
 }
Beispiel #27
0
 public override bool Start()
 {
     base.Stop();
     if (base._asset.SetNextCall())
     {
         Hash            hash      = (this._entityBone.Owner is Ped) ? Hash.START_PARTICLE_FX_LOOPED_ON_PED_BONE : Hash._START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE;
         InputArgument[] arguments = new InputArgument[13];
         arguments[0]  = base._effectName;
         arguments[1]  = this._entityBone.Owner.Handle;
         arguments[2]  = base.Offset.X;
         arguments[3]  = base.Offset.Y;
         arguments[4]  = base.Offset.Z;
         arguments[5]  = base.Rotation.X;
         arguments[6]  = base.Rotation.Y;
         arguments[7]  = base.Rotation.Z;
         arguments[8]  = this._entityBone.Index;
         arguments[9]  = base._scale;
         arguments[10] = base.InvertAxis.HasFlag(InvertAxis.X);
         arguments[11] = base.InvertAxis.HasFlag(InvertAxis.Y);
         arguments[12] = base.InvertAxis.HasFlag(InvertAxis.Z);
         base.Handle   = Function.Call <int>(hash, arguments);
         if (base.IsActive)
         {
             return(true);
         }
         base.Handle = -1;
     }
     return(false);
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_activeTextures.ContainsKey(this._textureDict.ToLower()))
         {
             int num = _activeTextures[this._textureDict.ToLower()];
             if (num != 1)
             {
                 _activeTextures[this._textureDict.ToLower()] = num - 1;
             }
             else
             {
                 InputArgument[] arguments = new InputArgument[] { this._textureDict };
                 Function.Call(Hash.SET_STREAMED_TEXTURE_DICT_AS_NO_LONGER_NEEDED, arguments);
                 _activeTextures.Remove(this._textureDict.ToLower());
             }
         }
         else
         {
             InputArgument[] arguments = new InputArgument[] { this._textureDict };
             Function.Call(Hash.SET_STREAMED_TEXTURE_DICT_AS_NO_LONGER_NEEDED, arguments);
         }
     }
 }
Beispiel #29
0
    private void drawDateTime()
    {
        float xpos = (float)(1.0 - Function.Call <float>((Hash) - 1067213516044759673L, new InputArgument[1]
        {
            InputArgument.op_Implicit(false)
        }) / 10.0) + this.xOffsetRight;
        float ypos = 0.0f;

        if (this.reallifeDateTime)
        {
            this.drawString2("DATE " + DateTime.Now.ToString("dd MM yy ddd", (IFormatProvider)CultureInfo.InvariantCulture).ToUpper() + "\nTIME " + DateTime.Now.ToString("HH mm ss", (IFormatProvider)CultureInfo.InvariantCulture), xpos, ypos, 0.5f, this.color_HUD, false);
        }
        else
        {
            string str1 = ((int)Function.Call <int>((Hash)4400224173958044981L, new InputArgument[0])).ToString();
            if (str1.Length == 1)
            {
                str1 = "0" + str1;
            }
            string str2 = (Function.Call <int>((Hash) - 4915917506096244831L, new InputArgument[0]) + 1).ToString();
            if (str2.Length == 1)
            {
                str2 = "0" + str2;
            }
            string str3 = ((int)Function.Call <int>((Hash) - 7631499212557191401L, new InputArgument[0])).ToString();
            this.drawString2("DATE " + str1 + " " + str2 + " " + str3 + "\nTIME " + World.get_CurrentDayTime().ToString().Replace(":", " "), xpos, ypos, 0.5f, this.color_HUD, false);
        }
    }
Beispiel #30
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);
 }
 public static void SetVehicleDensityMultiplierThisFrame(float multiplier)
 {
     Function.Call((Hash)2619521048766764343L, new InputArgument[1]
     {
         InputArgument.op_Implicit(multiplier)
     });
 }