Can't get off Vehicle Sound MV

This script adds a sound if player is on a vehicle and cannot exit from it.
If you use it, please add "Evil95" to the credits. Thank you.

Updated to 1.2.


Spoiler: Version 1.2
JavaScript:
//==============================================================================
// Cant get off Vehicle Sound
// -----------------------------------------------------------------------------
// Version 1.2 (19.06.2023)
// Von Evil95
//==============================================================================
/*:de
 * @plugindesc v1.2 Lässt ein Sound ertönen, sofern man nicht mit einem Fahrzeug laden oder austeigen kann.
 * @author Evil95
 * @target MZ
 *
 * @param SE
 * @type file
 * @dir audio/se/
 * @desc Wähle ein SE aus.
 * @default Buzzer1
 *
 * @param Volume
 * @type number
 * @desc Lautstärke.
 * Wert zwischen 0 und 100 eingeben.
 * @min 0
 * @max 100
 * @default 100
 *
 * @param Pitch
 * @type number
 * @desc Tonhöhe.
 * Wert zwischen 50 und 150 eingeben.
 * @min 50
 * @max 150
 * @default 100
 *
*/
/*:en
 * @plugindesc v1.2 Makes a sound if you cannot exit a vehicle.
 * @author Evil95
 *
 * @param SE
 * @type file
 * @dir audio/se/
 * @desc Select SE audio file.
 * @default Buzzer1
 *
 * @param Volume
 * @type number
 * @desc Enter value between 0 and 100.
 * @min 0
 * @max 100
 * @default 100
 *
 * @param Pitch
 * @type number
 * @desc Enter value between 50 and 150.
 * @min 50
 * @max 150
 * @default 100
 *
*/

var Imported = Imported || {};
Imported.Evil95_CantGetVehicleOffSound = true;

(() => {
    const params = PluginManager.parameters('Evil95_CantGetVehicleOffSound');
    const SE = String(params['SE']);
    const Vol = Number(params['Volume']);
    const Pit = Number(params['Pitch']);

    const _Game_Vehicle_isLandOk = Game_Vehicle.prototype.isLandOk;
    Game_Vehicle.prototype.isLandOk = function(x, y, d) {
        const result = _Game_Vehicle_isLandOk.call(this, x, y, d);
        if (!result) {
            AudioManager.playSe({name: SE, pan: 0, pitch: Pit, volume: Vol});
        }
        return result;
    };
})();
Save it as Evil95_CantGetVehicleOffSound.js.

Many Thanks go to Arthran for optimizing my code.

Original thread: https://forums.rpgmakerweb.com/threads/cant-get-off-vehicle-sound-mv.158459/