Police Add-on Vehicles Handling

Hi there,

I am trying to add police vehicles to FiveM with custom model names such as bmwarv. Now, it works perfect if we use stock handling but as soon as we add our own handling.meta the lights and sirens stop working and it has just a normal civ horn.

Is this a FiveM limitation or am I being stupid?

1 Like

You have something not configured properly. All of the vehicles on my server are add-on and have custom handling lines (even ones that overwrite defaults) so it’s def possible. Mind sharing your vehicles.meta and handling.metas so I can take a peak?

some1 know with ones you need to change in handling.meta and vehicles.meta so the cars goes faster and lower time to reach top speed?

https://www.gtamodding.com/wiki/Handling.meta

yeah but w/ ones :grimacing: sry for being a retard:ok_man:

Ya’ll really need to learn to use the search button, LOL:

Yes here you go;

vehicles.meta:

<Item>
      <modelName>audia4</modelName>
      <txdName>audia4</txdName>
      <handlingId>audia4</handlingId>
      <gameName>audia4</gameName>
      <vehicleMakeName />
      <expressionDictName>null</expressionDictName>
      <expressionName>null</expressionName>
      <animConvRoofDictName>null</animConvRoofDictName>
      <animConvRoofName>null</animConvRoofName>
      <animConvRoofWindowsAffected />
      <ptfxAssetName>null</ptfxAssetName>
      <audioNameHash>police3</audioNameHash>
      <layout>LAYOUT_RANGER</layout>
      <coverBoundOffsets>SHERIFF2_COVER_OFFSET_INFO</coverBoundOffsets>
      <explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
      <scenarioLayout />
      <cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
      <aimCameraName>BOX_VEHICLE_AIM_CAMERA</aimCameraName>
      <bonnetCameraName>VEHICLE_BONNET_CAMERA_STANDARD</bonnetCameraName>
      <povCameraName>DEFAULT_POV_CAMERA_LOOKAROUND</povCameraName>
      <FirstPersonDriveByIKOffset x="0.000000" y="-0.050000" z="-0.028000" />
      <FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
	  <FirstPersonProjectileDriveByIKOffset x="0.028000" y="-0.040000" z="0.075000" />
	  <FirstPersonProjectileDriveByPassengerIKOffset x="0.020000" y="0.060000" z="-0.090000" />
	  <FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.000000" z="-0.055000" />
	  <FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.000000" z="-0.055000" />
	  <FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="0.000000" z="-0.040000" />
	  <FirstPersonDriveByRightPassengerIKOffset x="-0.045000" y="-0.048000" z="-0.040000" />
	  <FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="-0.040000" />
	  <FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
	  <FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
	  <FirstPersonMobilePhoneOffset x="0.143000" y="0.245000" z="0.521000" />
      <FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.435000" />
      <PovCameraOffset x="0.000000" y="-0.125000" z="0.640000" />
      <PovCameraVerticalAdjustmentForRollCage value="0.000000" />
      <PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.030000" />
      <PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.070000" />
      <vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
      <shouldUseCinematicViewMode value="true" />
      <shouldCameraTransitionOnClimbUpDown value="false" />
      <shouldCameraIgnoreExiting value="false" />
      <AllowPretendOccupants value="true" />
      <AllowJoyriding value="false" />
      <AllowSundayDriving value="false" />
      <AllowBodyColorMapping value="true" />
      <wheelScale value="0.268600" />
      <wheelScaleRear value="0.268600" />
      <dirtLevelMin value="0.300000" />
      <dirtLevelMax value="0.850000" />
      <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="1.000000" />
      <HDTextureDist value="5.000000" />
      <lodDistances content="float_array">
        15.000000
        35.000000
        90.000000
        180.000000
        500.000000
        500.000000
      </lodDistances>
      <minSeatHeight value="0.966" />
      <identicalModelSpawnDistance value="20" />
      <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="100" />
      <swankness>SWANKNESS_1</swankness>
      <maxNum value="2" />
      <flags>FLAG_HAS_LIVERY FLAG_LAW_ENFORCEMENT FLAG_DONT_SPAWN_IN_CARGEN FLAG_IS_OFFROAD_VEHICLE FLAG_HAS_INTERIOR_EXTRAS FLAG_REPORT_CRIME_IF_STANDING_ON</flags>
      <type>VEHICLE_TYPE_CAR</type>
      <plateType>VPT_FRONT_AND_BACK_PLATES</plateType>
	  <dashboardType>VDT_CAVALCADE</dashboardType>
      <vehicleClass>VC_EMERGENCY</vehicleClass>
      <wheelType>VWT_SUV</wheelType>
      <trailers />
      <additionalTrailers />
      <drivers>
        <Item>
          <driverName>S_M_Y_Sheriff_01</driverName>
          <npcName />
        </Item>
      </drivers>
      <extraIncludes />
      <doorsWithCollisionWhenClosed />
      <driveableDoors />
      <bumpersNeedToCollideWithMap value="false" />
      <needsRopeTexture value="false" />
      <requiredExtras />
      <rewards>
        <Item>REWARD_WEAPON_CARBINERIFLE</Item>
        <Item>REWARD_AMMO_CARBINERIFLE</Item>
        <Item>REWARD_STAT_WEAPON</Item>
      </rewards>
      <cinematicPartCamera>
        <Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
        <Item>WHEEL_FRONT_LEFT_CAMERA</Item>
        <Item>WHEEL_REAR_RIGHT_CAMERA</Item>
        <Item>WHEEL_REAR_LEFT_CAMERA</Item>
      </cinematicPartCamera>
      <NmBraceOverrideSet />
      <buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
      <buoyancySphereSizeScale value="1.000000" />
      <pOverrideRagdollThreshold type="NULL" />
      <firstPersonDrivebyData>
        <Item>RANGER_CAVALCADE_FRONT_LEFT</Item>
        <Item>RANGER_FRONT_RIGHT</Item>
        <Item>RANGER_PRANGER_REAR_LEFT</Item>
        <Item>RANGER_PRANGER_REAR_RIGHT</Item>
      </firstPersonDrivebyData>
    </Item>
    <Item>
      <modelName>ninef</modelName>
      <txdName>ninef</txdName>
      <handlingId>NINEF</handlingId>
      <gameName>NINEF</gameName>
      <vehicleMakeName>OBEY</vehicleMakeName>
      <expressionDictName>null</expressionDictName>
      <expressionName>null</expressionName>
      <animConvRoofDictName>null</animConvRoofDictName>
      <animConvRoofName>null</animConvRoofName>
      <animConvRoofWindowsAffected />
      <ptfxAssetName>null</ptfxAssetName>
      <audioNameHash />
      <layout>LAYOUT_LOW</layout>
      <coverBoundOffsets>NINEF_COVER_OFFSET_INFO</coverBoundOffsets>
      <explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
      <scenarioLayout />
      <cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
      <aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
      <bonnetCameraName>VEHICLE_BONNET_CAMERA_MID_NEAR</bonnetCameraName>
      <povCameraName>REDUCED_NEAR_CLIP_POV_CAMERA</povCameraName>
      <FirstPersonDriveByIKOffset x="0.000000" y="-0.055000" z="-0.050000" />
      <FirstPersonDriveByUnarmedIKOffset x="0.000000" y="-0.100000" z="0.000000" />
	  <FirstPersonProjectileDriveByIKOffset x="0.000000" y="0.000000" z="0.000000" />
	  <FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="-0.045000" z="0.015000" />
	  <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.000000" z="0.000000" />
	  <FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="-0.055000" z="-0.020000" />
	  <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.100000" z="0.000000" />
	  <FirstPersonMobilePhoneOffset x="0.130000" y="0.211000" z="0.580000" />
	  <FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.156000" z="0.463000" />      
      <PovCameraOffset x="0.000000" y="-0.200000" z="0.695000" />
      <PovCameraVerticalAdjustmentForRollCage value="0.000000" />
      <PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
      <PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
      <vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
      <shouldUseCinematicViewMode value="true" />
      <shouldCameraTransitionOnClimbUpDown value="false" />
      <shouldCameraIgnoreExiting value="false" />
      <AllowPretendOccupants value="true" />
      <AllowJoyriding value="true" />
      <AllowSundayDriving value="true" />
      <AllowBodyColorMapping value="true" />
      <wheelScale value="0.268000" />
      <wheelScaleRear value="0.268000" />
      <dirtLevelMin value="0.000000" />
      <dirtLevelMax value="0.450000" />
      <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="1.000000" />
      <HDTextureDist value="5.000000" />
      <lodDistances content="float_array">
        15.000000
        30.000000
        60.000000	
        120.000000	
        500.000000	
        500.000000
      </lodDistances>
      <minSeatHeight value="0.812" />
      <identicalModelSpawnDistance value="20" />
      <maxNumOfSameColor value="1" />
      <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_4</swankness>
      <maxNum value="2" />
      <flags>FLAG_BOOT_IN_FRONT FLAG_SPORTS FLAG_SPAWN_ON_TRAILER FLAG_RICH_CAR FLAG_NO_BROKEN_DOWN_SCENARIO FLAG_HAS_INTERIOR_EXTRAS</flags>
      <type>VEHICLE_TYPE_CAR</type>
      <plateType>VPT_BACK_PLATES</plateType>
	  <dashboardType>VDT_SUPERGT</dashboardType>
      <vehicleClass>VC_SPORT</vehicleClass>
      <wheelType>VWT_HIEND</wheelType>
      <trailers />
      <additionalTrailers />
      <drivers />
      <extraIncludes />
      <doorsWithCollisionWhenClosed />
      <driveableDoors />
      <bumpersNeedToCollideWithMap value="false" />
      <needsRopeTexture value="false" />
      <requiredExtras />
      <rewards />
      <cinematicPartCamera>
        <Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
        <Item>WHEEL_FRONT_LEFT_CAMERA</Item>
        <Item>WHEEL_REAR_RIGHT_CAMERA</Item>
        <Item>WHEEL_REAR_LEFT_CAMERA</Item>
      </cinematicPartCamera>
      <NmBraceOverrideSet />
      <buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
      <buoyancySphereSizeScale value="1.000000" />
<!-- Example of adding extra vfx water samples
      <additionalVfxWaterSamples>
	<Item>
	  <position x="2.0" y="0.0" z="0.0" />
	  <size value="0.8" />
	</Item>
	<Item>
	  <position x="-2.0" y="0.0" z="0.0" />
	  <size value="0.8" />
	</Item>
	<Item>
	  <position x="0.0" y="0.0" z="2.0" />
	  <size value="1.0" />
	</Item>
      </additionalVfxWaterSamples>
-->
      <pOverrideRagdollThreshold type="NULL" />
	  <firstPersonDrivebyData>
        <Item>LOW_RAPIDGT_FRONT_LEFT</Item>
        <Item>LOW_RAPIDGT_FRONT_RIGHT</Item>
      </firstPersonDrivebyData>
    </Item>

My handling.meta

<CHandlingDataMgr>
  <HandlingData>
    <Item type="CHandlingData">
      <handlingName>audia4</handlingName>
      <fMass value="1500.000000" />
      <fInitialDragCoeff value="9.4270" />
      <fPercentSubmerged value="85.000000" />
      <vecCentreOfMassOffset x="0.000000" y="0.050000" z="-0.100000" />
      <vecInertiaMultiplier x="1.000000" y="1.600000" z="1.700000" />
      <fDriveBiasFront value="0.300000" />
      <nInitialDriveGears value="6" />
      <fInitialDriveForce value="0.365000" />
      <fDriveInertia value="1.000000" />
      <fClutchChangeRateScaleUpShift value="7.000000" />
      <fClutchChangeRateScaleDownShift value="6.000000" />
      <fInitialDriveMaxFlatVel value="175.00000" />
      <fBrakeForce value="1.100000" />
      <fBrakeBiasFront value="0.450000" />
      <fHandBrakeForce value="0.500000" />
      <fSteeringLock value="40.000000" />
      <fTractionCurveMax value="2.680000" />
      <fTractionCurveMin value="2.550000" />
      <fTractionCurveLateral value="22.500000" />
      <fTractionSpringDeltaMax value="0.150000" />
      <fLowSpeedTractionLossMult value="1.300000" />
      <fCamberStiffnesss value="0.000000" />
      <fTractionBiasFront value="0.485000" />
      <fTractionLossMult value="1.000000" />
      <fSuspensionForce value="2.650000" />
      <fSuspensionCompDamp value="1.500000" />
      <fSuspensionReboundDamp value="2.200000" />
      <fSuspensionUpperLimit value="0.050000" />
      <fSuspensionLowerLimit value="-0.110000" />
      <fSuspensionRaise value="0.000000" />
      <fSuspensionBiasFront value="0.520000" />
      <fAntiRollBarForce value="0.900000" />
      <fAntiRollBarBiasFront value="0.600000" />
      <fRollCentreHeightFront value="0.340000" />
      <fRollCentreHeightRear value="0.340000" />
      <fCollisionDamageMult value="0.700000" />
      <fWeaponDamageMult value="1.000000" />
      <fDeformationDamageMult value="0.700000" />
      <fEngineDamageMult value="1.500000" />
      <fPetrolTankVolume value="65.000000" />
      <fOilVolume value="5.000000" />
      <fSeatOffsetDistX value="0.000000" />
      <fSeatOffsetDistY value="-0.150000" />
      <fSeatOffsetDistZ value="0.050000" />
      <nMonetaryValue value="35000" />
      <strModelFlags>440010</strModelFlags>
      <strHandlingFlags>20002</strHandlingFlags>
      <strDamageFlags>0</strDamageFlags>
      <AIHandling>AVERAGE</AIHandling>
      <SubHandlingData>
        <Item type="NULL" />
        <Item type="NULL" />
        <Item type="NULL" />
      </SubHandlingData>
    </Item>
  </HandlingData>
</CHandlingDataMgr>

@Dixxycup

These look correct to me. Do you have the carvariations.meta? You need that. Also if you’ve merged w/ existing metas make sure you are clearing your server cache and restarting the sessionmanager. If not the vehicle may not appear when spawned.

<Item>
  <modelName>audia4</modelName>
  <colors>
    <Item>
      <indices content="char_array">
        134
        134
        156
        156
      </indices>
      <liveries>
        <Item value="true" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
      </liveries>
    </Item>
    <Item>
      <indices content="char_array">
        134
        134
        156
        156
      </indices>
      <liveries>
        <Item value="false" />
        <Item value="true" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
      </liveries>
    </Item>
    <Item>
      <indices content="char_array">
        134
        134
        156
        156
      </indices>
      <liveries>
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="true" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
      </liveries>
    </Item>
    <Item>
      <indices content="char_array">
        134
        134
        156
        156
      </indices>
      <liveries>
        <Item value="false" />
        <Item value="false" />
        <Item value="true" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
      </liveries>
    </Item>
    <Item>
      <indices content="char_array">
        134
        134
        156
        156
      </indices>
      <liveries>
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="true" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
        <Item value="false" />
      </liveries>
    </Item>
  </colors>
  <kits>
    <Item>157_massacaro2_modkit</Item>
  </kits>
  <windowsWithExposedEdges />
  <plateProbabilities>
    <Probabilities />
  </plateProbabilities>
  <lightSettings value="1" />
  <sirenSettings value="1" />
</Item>

Here you go @Dixxycup

They spawn fine but since they are police vehicles the lights and sirens don’t work unless we remove the custom handling.

The handling.meta shouldn’t have anything to do w/ the car class (which you have correct as emergency). The only thing I can see that is different than the ones we run is “srtHandlingFlags” should be 0 (or is 0 on all our police vehicles) but again I don’t think that has anything to do w/ the car classification.

If you wanna zip and upload the model/metas to a google drive and send me a download link I can throw it on one of our test servers and see if I can get it to work. Other than that and what I listed above you appear to have everything done correctly.

I’ll PM you the dropbox link since the forums don’t like anything above a certain filesize.

Anyone else have any solutions also having this issue?

I’m gonna play w/ the files tonight @ItsTimbo (our server had a busy weekend, apologies).

2 Likes

Hey @ItsTimbo ,

So I took the files you sent me and put them on my server exactly as they came over. First I did the vehicle as a separate resource and then merged it into our existing metas. It worked both ways so I’m not really sure what else to do. Is your server streaming the Luxart siren controls? Double check the settings there if you’re using that. Otherwise the vehicle itself is put together and works properly so it has to be some other sort of conflict. Sorry man, wish I could be more helpful.

https://drive.google.com/file/d/1uePpjxA-ZP9jTlKlW7oEP1tlWmlpwSY_/view?usp=sharing