example
example

教程 在插件汽车上改变引擎声音!

Yann

站长
管理成员
GTAOS管理组
认证卖家
认证用户
本 月 名 人 榜 最 佳
原帖:https://forum.cfx.re/t/how-to-custom-engine-sounds-on-addon-cars/53402

我想我应该发布一个快速简单的教程,介绍如何轻松更改 FiveM 服务器中插件汽车的车辆声音。请按照以下步骤操作。

首先,您要转到 cars.meta 文件并找到要编辑的汽车。
XML:
<Item>
            <modelName>charger</modelName>
            <txdName>charger</txdName>
            <handlingId>POLICE3</handlingId>
            <gameName>POLICE3</gameName>
            <vehicleMakeName>police3</vehicleMakeName>
            <expressionDictName>null</expressionDictName>
            <expressionName>null</expressionName>
            <animConvRoofDictName>null</animConvRoofDictName>
            <animConvRoofName>null</animConvRoofName>
            <animConvRoofWindowsAffected />
            <ptfxAssetName>null</ptfxAssetName>
            <audioNameHash>police3</audioNameHash>
            <layout>LAYOUT_BIKE_DIRT</layout>
            <coverBoundOffsets>BIKE_COVER_OFFSET_INFO</coverBoundOffsets>
            <POVTuningInfo>SANCHEZ_POV_TUNING</POVTuningInfo>
            <explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
            <scenarioLayout />
            <cameraName>FOLLOW_UPRIGHT_BIKE_CAMERA</cameraName>
            <aimCameraName>BIKE_AIM_CAMERA</aimCameraName>
            <bonnetCameraName>BIKE_SANCHEZ_POV_CAMERA</bonnetCameraName>
            <povCameraName>BIKE_SANCHEZ_POV_CAMERA</povCameraName>
            <FirstPersonDriveByIKOffset x="0.000000" y="-0.060000" z="0.000000" />
            <FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonProjectileDriveByIKOffset x="0.030000" y="0.020000" z="0.000000" />
            <FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="-0.060000" z="-0.020000" />
            <FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
            <FirstPersonMobilePhoneOffset x="0.155000" y="0.315000" z="0.520000" />
            <FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.425000" />
            <PovCameraOffset x="0.000000" y="0.000000" z="0.000000" />
            <PovCameraVerticalAdjustmentForRollCage value="0.000000" />
            <PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.200000" />
            <PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
            <vfxInfoName>VFXVEHICLEINFO_MOTORBIKE_GENERIC</vfxInfoName>
            <shouldUseCinematicViewMode value="true" />
            <shouldCameraTransitionOnClimbUpDown value="false" />
            <shouldCameraIgnoreExiting value="false" />
            <AllowPretendOccupants value="false" />
            <AllowJoyriding value="true" />
            <AllowSundayDriving value="true" />
            <AllowBodyColorMapping value="true" />
            <wheelScale value="0.267000" />
            <wheelScaleRear value="0.238800" />
            <dirtLevelMin value="0.000000" />
            <dirtLevelMax value="1.000000" />
            <envEffScaleMin value="0.000000" />
            <envEffScaleMax value="1.000000" />
            <envEffScaleMin2 value="0.000000" />
            <envEffScaleMax2 value="1.000000" />
            <damageMapScale value="0.600000" />
            <damageOffsetScale value="1.000000" />
            <diffuseTint value="0x00FFFFFF" />
            <steerWheelMult value="0.700000" />
            <HDTextureDist value="5.000000" />
            <lodDistances content="float_array">
        10.000000   
        25.000000   
        60.000000   
        120.000000   
        500.000000   
        500.000000
      </lodDistances>
            <identicalModelSpawnDistance value="80" />
            <maxNumOfSameColor value="10" />
            <defaultBodyHealth value="1000.000000" />
            <pretendOccupantsScale value="1.000000" />
            <visibleSpawnDistScale value="1.000000" />
            <trackerPathWidth value="2.000000" />
            <weaponForceMult value="1.000000" />
            <frequency value="30" />
            <swankness>SWANKNESS_1</swankness>
            <maxNum value="5" />
            <flags>FLAG_NO_BOOT FLAG_LAW_ENFORCEMENT FLAG_NO_RESPRAY FLAG_IGNORE_ON_SIDE_CHECK FLAG_DONT_SPAWN_IN_CARGEN FLAG_HEADLIGHTS_USE_ACTUAL_BONE_POS FLAG_BIKE_CLAMP_PICKUP_LEAN_RATE FLAG_REPORT_CRIME_IF_STANDING_ON</flags>
            <type>VEHICLE_TYPE_BIKE</type>
            <plateType>VPT_NONE</plateType>
            <dashboardType>VDT_SPORTBK</dashboardType>
            <vehicleClass>VC_EMERGENCY</vehicleClass>
            <wheelType>VWT_BIKE</wheelType>
            <trailers />
            <additionalTrailers />
            <drivers>
                <Item>
                    <driverName>A_M_M_Hillbilly_02</driverName>
                    <npcName />
                </Item>
                <Item>
                    <driverName>A_M_M_Salton_01</driverName>
                    <npcName />
                </Item>
            </drivers>
            <extraIncludes />
            <doorsWithCollisionWhenClosed />
            <driveableDoors />
            <bumpersNeedToCollideWithMap value="false" />
            <needsRopeTexture value="false" />
            <requiredExtras />
            <rewards />
            <cinematicPartCamera>
                <Item>WHEEL_REAR_LEFT_CAMERA</Item>
            </cinematicPartCamera>
            <NmBraceOverrideSet>Bike</NmBraceOverrideSet>
            <buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
            <buoyancySphereSizeScale value="1.000000" />
            <pOverrideRagdollThreshold type="NULL" />
            <firstPersonDrivebyData>
                <Item>BIKE_SANCHEZ_FRONT</Item>
                <Item>BIKE_DAEMON_REAR</Item>
            </firstPersonDrivebyData>
        </Item>

你的vehicle.meta文件应该是这样的。

找到像这样的线。第13行
XML:
<audioNameHash>police3</audioNameHash>


现在,您想找到要替换“police3”的正确车辆发动机声音。请使用此链接查找您想要使用的汽车的衍生名称!

例如,由于我正在编辑一个道奇charger,我想要一个不错的结实的V8声音。所以我要使用dominator。

现在,在您找到派生名称后,只需将其替换为现有模型名称即可。
XML:
<audioNameHash>dominator</audioNameHash>
 
顶部