<aside> ⚡ script "core_AmmoScript" (int amount)
</aside>
A standardized ammo restoration script which restores a percentage of the calling player’s current weapon’s ammo, modified by that weapon’s ammo gain factor.
<aside>
🚨 This script only works for weapons defined using [DefineWeapon](<https://mm8bdm.notion.site/DefineWeapon-6a4db7e06fb0415e8f80c3407c378ff8>)
! It will have no effect when used for undefined weapons.
</aside>
amount
: int - The percent of ammo to restoreReturns if the player restored any ammo or not.
The inventory actor below is given by a successful W Tank use to restore 100% of the player’s current weapon’s ammo, modified by its ammo gain factor.
actor WTankAmmo : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_AmmoScript", 100)
stop
}
}