Skip to content

Commit

Permalink
Change InfiniteAmmo only if WPUnlimitedAmmo is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
IS4Code authored Jan 1, 2022
1 parent fcbe679 commit e6fa739
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 (Game.PlayerPed.Weapons.Current != null && Game.PlayerPed.Weapons.Current.Hash != WeaponHash.Unarmed && IsAllowed(Permission.WPUnlimitedAmmo))
{
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 e6fa739

Please sign in to comment.