RefillPlayerAmmo

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.55.

Description

A debug-oriented function to give the player more ammo for their currently equipped weapon. If a specific type of ammo is equipped, will add that ammo type instead of the weapon's default ammo type.

Additionally, this ammo will be used to refill the player's clip as much as possible, with the rest ending up in the backup ammunition count. This is useful to avoid potentially long reload animations.

Will not work with equipped weapons that have regenerating ammo.

This acts as a shortcut to using AddItem to recover ammo for your current weapon.

Syntax

[help]
RefillPlayerAmmo numAmmoToAdd:int

Example

RefillPlayerAmmo 10

If the player has ammo currently equipped, will add 10 more of that ammo, possibly refilling part of their clips. If they don't but they have a weapon equipped, will add 10 of that weapon's default ammo.