TogglingNoclip
Gets called when the player is attempting to toggle noclip (pressed alt).
Start a script section
!-- OnEvent TogglingNoclip
-- require @evPlayer $evNewNoclipState $evIsAllowed
# Add your instructions here
- Group: PlayerEvents
- Cancellable: Yes
- Event data:
PlayerTogglingNoclipEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player who is attempting to toggle noclip. |
$evNewNoclipState | bool value | Gets or sets the new state that will be applied to the noclip flag. |
$evIsAllowed | bool value | Whether the event is allowed to run. Remarks: This value is assigned on based on whether the player has noclip permitted. So it may not be allowed by default for some players. |