SendingAttachmentsPrefs
Gets called when player is changing weapon attachments preferences.
Start a script section
!-- OnEvent SendingAttachmentsPrefs
-- require @evPlayer $evFirearmType $evOldAttachments $evNewAttachments $evIsAllowed
# Add your instructions here
- Group: PlayerEvents
- Cancellable: Yes
- Event data:
PlayerSendingAttachmentsPrefsEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
@evPlayer | player value | Gets the player that invoked the event. |
$evFirearmType | ItemType enum value | Gets the ItemType of the firearm. |
$evOldAttachments | number value | Gets previous attachments code stored on the server. |
$evNewAttachments | number value | Gets or sets new attachments code. Edited values are NOT propagated back to the client and are stored on the server for on-spawn purposes. |
$evIsAllowed | bool value | Whether the event is allowed to run. |