Cruise control
#1

Hi, this was already tried and failed (http://forum.sa-mp.com/index.php?topic=65043.0) but I have and actual working idea for cruise control for my trucking server, only i need some help.

When I press KEY_ACTION, my VehicleVelocity is saved to 2 variables: X and Y, and as long as KEY_ACTION is pressed, every second my VehicleVelocity is set for the variable.
This works fine, but now I want to enable player to make turns while using cruise control. I need to release KEY_ACTION, change direction and then press KEY_ACTION again, otherwise, vehicle will keep going forward sideways.

Now my idea is to save speed into one variable and set VehicleVelocity depending on its Z-angle. I'm not that good at math, but if someone knows how to get X and Y velocity from angle and speed of car it'd help a lot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)