I'm trying to make a mod that creates a new vehicle every 10 seconds, sets the speed/acceleration to match my current vehicle's speed/acceleration, then puts the Player into that new vehicle. So for example if I'm driving Car A at 100m/s, it would spawn Car B with the same speed/acceleration as Car A, then put the player into Car B.
Creating the new vehicle, setting its speed to match my current speed, and putting the player into it is working, but I can't get the new vehicle to start accelerating properly. Right now I spawn the new vehicle, set its ForwardSpeed to my previous Vehicle's Speed, put the player into it, but then... the car slowly decelerates (no matter what inputs I press), and it only starts accelerating once the car is nearly stopped. It seems like the game refuses to let my new vehicle start accelerating until it is moving at an incredibly low speed - which means I have to wait for the new car to slowly come to a halt for 5+ seconds before I can actually get it to accelerate, which ruins the whole point of maintaining my speed across car spawns.
I'm not very familiar with the Vehicle mechanics in general so I might be missing something obvious. I've tried setting the new vehicle's Gears, Throttle, Clutch, and RPM to match the previous vehicle's settings, but it still refuses to start accelerating when spawned. In ScriptHookVDotNet there's a Vehicle.Acceleration float, but I can only "get" the value rather than set it.
Is this just some fundamental restriction on when cars can accelerate in GTA 5, or am I missing something in the code? Any thoughts or advice are appreciated!