ChangingAttachments
Gets called when player is changing weapon attachments.
Start a script section
!-- OnEvent ChangingAttachments
-- require @evPlayer *evFirearmItem $evOldAttachments $evNewAttachments $evIsAllowed
# Add your instructions here
- Group: PlayerEvents
- Cancellable: Yes
- Event data:
PlayerChangingAttachmentsEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player that invoked the event. |
*evFirearmItem | reference to FirearmItem object | The weapon that is involved in the event. |
$evOldAttachments | number value | Gets previous attachments code. |
$evNewAttachments | number value | Gets or sets new attachments code. |
$evIsAllowed | bool value | Whether the event is allowed to run. |