OnPlayerWeaponModeChange
Jump to navigation
Jump to search
onPlayerWeaponModeChange
AVAILABLE FROM UPDATE 0.1.5
This event is available in G1R:MP 0.1.5 and later. The contract below includes the compatibility guarantees introduced in that update.
Reports a change of observed player drawn-weapon mode.
Availability
This event is available in server-side scripts.
Callback signature
function(playerId, previousMode, newMode)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
Player ID. |
previousMode |
string |
Previous observed mode. |
newMode |
string |
New observed mode. |
Notes
- Listen with addEventHandler(eventName, root, handler). Server observation/event, not client authority.
- Modes: none/fist/melee/bow/crossbow/magic. First known observation sets a baseline without an event. Multiple transitions inside one server packet batch may coalesce. Not an inventory change or damage permission.
- See NPC scripting and Update 0.1.5.