Skip to main content

TogglingWeaponFlashlight

Gets called when the player is toggling a weapon flashlight.

Start a script section

!-- OnEvent TogglingWeaponFlashlight
-- require @evPlayer *evFirearmItem $evNewState $evIsAllowed

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

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is toggling the flashlight.
*evFirearmItemreference to FirearmItem objectGets the flashlight item.
$evNewStatebool valueGets the new state of the flashlight.
$evIsAllowedbool valueWhether the event is allowed to run.