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
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player who is toggling the flashlight. |
*evFirearmItem | reference to FirearmItem object | Gets the flashlight item. |
$evNewState | bool value | Gets the new state of the flashlight. |
$evIsAllowed | bool value | Whether the event is allowed to run. |