mirror of
https://github.com/BeamMP/Docs.git
synced 2026-05-19 00:00:43 +00:00
Merge pull request #303 from carsakiller/302-clarify-vehicle-swap-event
add: clarify that replacing a vehicle only fires onVehicleEdited
This commit is contained in:
@@ -1171,14 +1171,14 @@ Triggered when a player sends a chat message. When cancelled, it will not show t
|
|||||||
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
||||||
Cancellable: YES
|
Cancellable: YES
|
||||||
|
|
||||||
Triggered when a player spawns a new vehicle. The `data` argument contains the car's configuration and positional/rotational data for the vehicle as a json string.
|
Triggered when a player spawns a new vehicle. Note that vehicle swaps/replacements instead fire [`onVehicleEdited`](#onvehicleedited). The `data` argument contains the car's configuration and positional/rotational data for the vehicle as a json string.
|
||||||
|
|
||||||
##### `onVehicleEdited`
|
##### `onVehicleEdited`
|
||||||
|
|
||||||
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
Arguments: `player_id: number`, `vehicle_id: number`, `data: string`
|
||||||
Cancellable: YES
|
Cancellable: YES
|
||||||
|
|
||||||
Triggered when a player edits their vehicle and applies the edit. The `data` argument contains the car's updated configuration as a json string but does **not** include positional or rotational data. You can use [MP.GetPositionRaw](#mpgetpositionrawpid-number-vid-number-tablestring) to get positional and rotational data.
|
Triggered when a player edits or replaces their vehicle. The `data` argument contains the car's updated configuration as a json string but does **not** include positional or rotational data. You can use [MP.GetPositionRaw](#mpgetpositionrawpid-number-vid-number-tablestring) to get positional and rotational data.
|
||||||
|
|
||||||
##### `onVehicleDeleted`
|
##### `onVehicleDeleted`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user