Skip to main content

PickingUpAmmo

Gets called when the player is picking up ammo.

Start a script section

!-- OnEvent PickingUpAmmo
-- require @evPlayer $evAmmoType $evAmmoAmount *evAmmoPickup $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerPickingUpAmmoEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is picking up the ammo pickup.
$evAmmoTypeItemType enum valueGets type of the ammo.
$evAmmoAmountnumber valueGets the amount of ammo that is being picked up.
*evAmmoPickupreference to AmmoPickup objectGets the ammo pickup.
$evIsAllowedbool valueWhether the event is allowed to run.