TogglingFlashlight
Gets called when the player is toggling a flashlight.
Start a script section
!-- OnEvent TogglingFlashlight
-- require @evPlayer *evLightItem $evNewState $evIsAllowed
# Add your instructions here
- Group: PlayerEvents
- Cancellable: Yes
- Event data:
PlayerTogglingFlashlightEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player who is toggling the flashlight. |
*evLightItem | reference to LightItem object | Gets the flashlight that is being toggled. |
$evNewState | bool value | Gets whether the flashlight is being toggled to on or off state. |
$evIsAllowed | bool value | Whether the event is allowed to run. |