VehicleVelocity
#1

Okay so,im making a small FS in which u can change your car to whichever u want!
I also want when i change the car to keep the same velocity as it had when i was driving the car!

I made somthing like this

new Float:VelocityX, Float:VelocityY,Float:VelocityZ;
Then on the command

GetVehicleVelocity(GetPlayerVehicleID(i), VelocityX, VelocityY, VelocityZ);
and also...

SetVehicleVelocity(newveh, VelocityX, VelocityY, VelocityZ);

But when i spawn in a different car the Velocity its set to 0.
Help
Reply
#2

Getting the velocity is just like getting the pos. So when setting velocity try using x + 1 and y + 1
Reply
#3

Shouldn't it be X*1 Y*1?
Reply
#4

Eh yeah whatever. btw multiplying one gives the number itself. Don't you mean 2?
Reply
#5

Its not working...
Reply
#6

Show some code first.
Reply
#7

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Show some code first.
Indeed, we need code, cuz the way you showed it it should actually work. There seems to be another problem.
Reply
#8

Here is the whole code of what im trying to do!

http://pastebin.com/sBrDsZBb
Reply
#9

Have you tried using a small timer or the printf() function to check the values of the variables?
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)