schwim
September 11, 2018, 1:48pm
1
Hi there guys!
I’m getting started converting vehicles for use in FiveM and I’ve followed some how-tos but while I’m able to figure out how to replace cars, I’m having problems understanding how to add cars for use with their own model name.
As an example, I wanted to try this sprintcar:
So I added all the files to a sprintcar/stream folder and put a blank __resource.lua in the root sprintcar folder and while the game loads the resource without error, I seem unable to spawn the car using the model sprintcar.
I am sure I’m missing an important step. Could someone let me know what it is?
Thanks for your time!
If it is an addon you will need a vehicles.meta, I’m pretty sure that strip race is just a map. I’m not sure.
schwim
September 11, 2018, 5:04pm
3
Lucifer, I’m very sorry, I linked the wrong thing. I mean this sprintcar:
schwim
September 11, 2018, 5:38pm
4
The vehicle in question does have a vehicles.meta included. If I understand it correctly, it’s spawn name would be “sprintcar” This resource is starting without error but I’m told a vehicle with that name doesn’t exist when I try to spawn it.
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
<residentTxd>vehshare</residentTxd>
<residentAnims />
<InitDatas>
<Item>
<modelName>sprintcar</modelName>
<txdName>sprintcar</txdName>
<handlingId>SPRINT</handlingId>
<gameName>sprintcar</gameName>
<vehicleMakeName>VAPID</vehicleMakeName>
<expressionDictName>null</expressionDictName>
<expressionName>null</expressionName>
<animConvRoofDictName>null</animConvRoofDictName>
<animConvRoofName>null</animConvRoofName>
<animConvRoofWindowsAffected />
<ptfxAssetName>null</ptfxAssetName>
<audioNameHash>btype2</audioNameHash>
<layout>LAYOUT_STD_TROPHY</layout>
<coverBoundOffsets>TROPHY_COVER_OFFSET_INFO</coverBoundOffsets>
<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
<scenarioLayout />
<cameraName>FOLLOW_JEEP_CAMERA</cameraName>
<aimCameraName>JEEP_AIM_CAMERA</aimCameraName>
<bonnetCameraName>VEHICLE_BONNET_CAMERA_NEAR_LOW</bonnetCameraName>
<povCameraName>DEFAULT_POV_CAMERA</povCameraName>
<FirstPersonDriveByIKOffset x="0.000000" y="-0.060000" z="0.015000" />
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="-0.025000" z="0.000000" />
<FirstPersonProjectileDriveByIKOffset x="0.000000" y="-0.060000" z="0.000000" />
<FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="-0.040000" 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.000000" z="0.000000" />
<FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="-0.060000" z="0.015000" />
<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.025000" z="0.000000" />
<FirstPersonMobilePhoneOffset x="0.143000" y="0.171000" z="0.536000" />
<FirstPersonPassengerMobilePhoneOffset x="0.190000" y="0.138000" z="0.445000" />
<PovCameraOffset x="0.000000" y="-0.250000" z="0.655000" />
<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_OFFROAD</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.271500" />
<wheelScaleRear value="0.271500" />
<dirtLevelMin value="0.900000" />
<dirtLevelMax value="0.990000" />
<envEffScaleMin value="0.500000" />
<envEffScaleMax value="1.000000" />
<envEffScaleMin2 value="0.000000" />
<envEffScaleMax2 value="1.000000" />
<damageMapScale value="0.350000" />
<damageOffsetScale value="0.350000" />
<diffuseTint value="0x00FFFFFF" />
<steerWheelMult value="0.700000" />
<HDTextureDist value="5.000000" />
<lodDistances content="float_array">
15.000000
35.000000
90.000000
180.000000
500.000000
500.000000
</lodDistances>
<minSeatHeight value="0.87" />
<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="50" />
<swankness>SWANKNESS_1</swankness>
<maxNum value="10" />
<flags>FLAG_NO_BOOT FLAG_AVERAGE_CAR FLAG_POOR_CAR FLAG_IS_OFFROAD_VEHICLE FLAG_IS_BULKY FLAG_HAS_LIVERY</flags>
<type>VEHICLE_TYPE_CAR</type>
<dashboardType>VDT_RACE</dashboardType>
<plateType>VPT_NONE</plateType>
<vehicleClass>VC_OFF_ROAD</vehicleClass>
<wheelType>VWT_OFFROAD</wheelType>
<trailers />
<additionalTrailers />
<drivers />
<extraIncludes />
<doorsWithCollisionWhenClosed>
<Item>VEH_EXT_BOOT</Item>
<Item>VEH_EXT_BONNET</Item>
</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>Truck</NmBraceOverrideSet>
<buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
<buoyancySphereSizeScale value="1.000000" />
<pOverrideRagdollThreshold type="NULL" />
<firstPersonDrivebyData>
<Item>STD_TROPHY_FRONT_LEFT</Item>
<Item>STD_TROPHY_FRONT_RIGHT</Item>
</firstPersonDrivebyData>
</Item>
</InitDatas>
<txdRelationships>
<Item>
<parent>vehicles_race_interior</parent>
<child>vehicles_race_generic</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>sprintcar</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>sprintcar2</child>
</Item>
<Item>
<parent>vehshare_truck</parent>
<child>rallytruck</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>omnis</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>tyrus</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>sheava</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>tampa2</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>tropos</child>
</Item>
<Item>
<parent>vehicles_race_generic</parent>
<child>le7b</child>
</Item>
<Item>
<parent>vehicles_cav_interior</parent>
<child>contender</child>
</Item>
<Item>
<parent>vehicles_chopperbk_interior</parent>
<child>cliffhanger</child>
</Item>
<Item>
<parent>vehicles_sportbk_interior</parent>
<child>bf400</child>
</Item>
<Item>
<parent>vehicles_cav_interior</parent>
<child>brioso</child>
</Item>
<Item>
<parent>vehicles_chopperbk_interior</parent>
<child>gargoyle</child>
</Item>
<Item>
<parent>vehicles_supergt_interior</parent>
<child>lynx</child>
</Item>
</txdRelationships>
</CVehicleModelInfo__InitDataList>
schwim
September 11, 2018, 6:23pm
5
So I’ve made it further in that I’ve managed to spawn the vehicle without error but currently, it’s spawning without textures. There’s no errors in server and in client it only shows that it successfully downloaded the ftd, yft and hi.yft files. the zip of the car as I’m trying it now .
I found another tutorial to try to follow but if anyone has an idea of what I’ve done wrong, I’d greatly appreciate it!
Rally1
December 18, 2020, 9:22am
6
Nearly snapped my keyboard on why it wasnt working lol