Skip to content

Commit

Permalink
Merge pull request #271 from IllidanS4/patch-1
Browse files Browse the repository at this point in the history
Change InfiniteAmmo only if WPUnlimitedAmmo is allowed
  • Loading branch information
TomGrobbe authored May 5, 2022
2 parents 1ba6298 + ba29907 commit 81f230d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vMenu/FunctionsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,9 +1382,9 @@ private async Task WeaponOptions()
}

// Enable/disable infinite ammo.
if (Game.PlayerPed.Weapons.Current != null && Game.PlayerPed.Weapons.Current.Hash != WeaponHash.Unarmed)
if (IsAllowed(Permission.WPUnlimitedAmmo) && Game.PlayerPed.Weapons.Current != null && Game.PlayerPed.Weapons.Current.Hash != WeaponHash.Unarmed)
{
Game.PlayerPed.Weapons.Current.InfiniteAmmo = MainMenu.WeaponOptionsMenu.UnlimitedAmmo && IsAllowed(Permission.WPUnlimitedAmmo);
Game.PlayerPed.Weapons.Current.InfiniteAmmo = MainMenu.WeaponOptionsMenu.UnlimitedAmmo;
}

if (MainMenu.WeaponOptionsMenu.AutoEquipChute)
Expand Down

0 comments on commit 81f230d

Please sign in to comment.