Hello,
I am having issues getting my addon vehicles to load into the game. The console shows that there is no issue getting it to load. I have added the files below. At one point they used to load. I tried clearing the server cache and my FiveM cache but neither work… The .ytd file was split into 3 parts and was added to the txdRelationships in the vehicle metas to speed up the resource streaming which I found here Split Vehicle YTD Files.
Any assistance would be greatly appreciated!
Console output when loading:
[ citizen-server-impl] Asset MarionFPIU/MarionFPIU.yft uses 20.7 MiB of virtual memory.
[ citizen-server-impl] Asset MarionFPIU/MarionFPIU.ytd uses 32.0 MiB of physical memory.
[ citizen-server-impl] Asset MarionFPIU/MarionFPIU1.ytd uses 32.0 MiB of physical memory.
[ citizen-server-impl] Asset MarionFPIU/MarionFPIU2.ytd uses 31.5 MiB of physical memory.
[ citizen-server-impl] Started resource MarionFPIU
I have the .yft and .ytd files in
/resources/[cars]/MarionFPIU/stream
All the .meta files are in the root MarionFPIU folder, with the fxmanifest, and vehicle_names.lua folders.
vehicles.meta
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
<residentTxd>vehshare</residentTxd>
<residentAnims />
<InitDatas>
<Item>
<modelName>MarionFPIU</modelName>
<txdName>MarionFPIU</txdName>
<handlingId>POLICE3</handlingId>
<gameName>POLICE</gameName>
<vehicleMakeName />
<expressionDictName>null</expressionDictName>
<expressionName>null</expressionName>
<animConvRoofDictName>null</animConvRoofDictName>
<animConvRoofName>null</animConvRoofName>
<animConvRoofWindowsAffected />
<ptfxAssetName>null</ptfxAssetName>
<audioNameHash>nightshark</audioNameHash>
<layout>LAYOUT_STD_EXITFIXUP</layout>
<coverBoundOffsets>POLICE3_COVER_OFFSET_INFO</coverBoundOffsets>
<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
<scenarioLayout />
<cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
<aimCameraName>MID_BOX_VEHICLE_AIM_CAMERA</aimCameraName>
<bonnetCameraName>VEHICLE_BONNET_CAMERA_MID_NEAR</bonnetCameraName>
<povCameraName>DEFAULT_POV_CAMERA</povCameraName>
<FirstPersonDriveByIKOffset x="0.000000" y="-0.060000" z="-0.030000" />
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="-0.020000" />
<FirstPersonProjectileDriveByIKOffset x="0.055000" y="-0.075000" z="-0.045000" />
<FirstPersonProjectileDriveByPassengerIKOffset x="-0.055000" y="-0.075000" z="-0.045000" />
<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.060000" z="-0.030000" />
<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.130000" y="0.275000" z="0.530000" />
<FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.425000" />
<FirstPersonMobilePhoneSeatIKOffset>
<Item>
<Offset x="0.136000" y="0.156000" z="0.445000" />
<SeatIndex value="2" />
</Item>
<Item>
<Offset x="0.136000" y="0.156000" z="0.445000" />
<SeatIndex value="3" />
</Item>
</FirstPersonMobilePhoneSeatIKOffset>
<PovCameraOffset x="0.000000" y="-0.175000" z="0.675000" />
<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="false" />
<AllowSundayDriving value="false" />
<AllowBodyColorMapping value="false" />
<wheelScale value="0.244000" />
<wheelScaleRear value="0.244000" />
<dirtLevelMin value="0.000000" />
<dirtLevelMax value="0.300000" />
<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
70.000000
140.000000
500.000000
500.000000
</lodDistances>
<minSeatHeight value="0.83" />
<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_0</swankness>
<maxNum value="2" />
<flags>FLAG_HAS_LIVERY FLAG_EXTRAS_ALL FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_HAS_INTERIOR_EXTRAS FLAG_REPORT_CRIME_IF_STANDING_ON</flags>
<type>VEHICLE_TYPE_CAR</type>
<plateType>VPT_BACK_PLATES</plateType>
<dashboardType>VDT_GENTAXI</dashboardType>
<vehicleClass>VC_EMERGENCY</vehicleClass>
<wheelType>VWT_SPORT</wheelType>
<trailers />
<additionalTrailers />
<drivers>
<Item>
<driverName>S_M_Y_Cop_01</driverName>
<npcName />
</Item>
</drivers>
<extraIncludes />
<doorsWithCollisionWhenClosed />
<driveableDoors />
<bumpersNeedToCollideWithMap value="false" />
<needsRopeTexture value="false" />
<requiredExtras />
<rewards>
<Item>REWARD_WEAPON_PUMPSHOTGUN</Item>
<Item>REWARD_AMMO_PUMPSHOTGUN_ENTER_VEHICLE</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>STD_POLICE3_FRONT_LEFT</Item>
<Item>STD_POLICE3_FRONT_RIGHT</Item>
<Item>STD_POLICE2_REAR_LEFT</Item>
<Item>STD_POLICE2_REAR_RIGHT</Item>
</firstPersonDrivebyData>
</Item>
</InitDatas>
<txdRelationships>
<Item>
<parent>MarionFPIU1</parent>
<child>MarionFPIU</parent>
</Item>
<Item>
<parent>MarionFPIU2</parent>
<child>MarionFPIU1</parent>
</Item>
<Item>
<parent>vehicles_dom_interior</parent>
<child>MarionFPIU2</parent>
</Item>
</txdRelationships>
</CVehicleModelInfo__InitDataList>
Carvariations.meta
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfoVariation>
<variationData>
<Item>
<modelName>MarionFPIU</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>
</variationData>
</CVehicleModelInfoVariation>
fxmanifest.lua
fx_version "cerulean"
games { "gta5" }
files {
"vehicles.meta",
"carvariations.meta",
}
data_file "VEHICLE_METADATA_FILE" "vehicles.meta"
data_file "VEHICLE_VARIATION_FILE" "carvariations.meta"
client_script "vehicle_names.lua"
And last but not least, the vehicle_names.lua file
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
-- AddTextEntry("modelName", "myName")
AddTextEntry("MarionFPIU", "MarionFPIU")
end)