VehicleVelocity - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: VehicleVelocity (
/showthread.php?tid=190138)
VehicleVelocity -
ColdXX - 14.11.2010
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
Re: VehicleVelocity -
Retardedwolf - 14.11.2010
Getting the velocity is just like getting the pos. So when setting velocity try using x + 1 and y + 1
Re: VehicleVelocity -
ColdXX - 14.11.2010
Shouldn't it be X*1 Y*1?
Re: VehicleVelocity -
Retardedwolf - 14.11.2010
Eh yeah whatever. btw multiplying one gives the number itself. Don't you mean 2?
Re: VehicleVelocity -
ColdXX - 14.11.2010
Its not working...
Re: VehicleVelocity -
Hiddos - 14.11.2010
Show some code first.
Re: VehicleVelocity -
DeathOnaStick - 14.11.2010
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.
Re: VehicleVelocity -
ColdXX - 14.11.2010
Here is the whole code of what im trying to do!
http://pastebin.com/sBrDsZBb
Re: VehicleVelocity -
Hiddos - 14.11.2010
Have you tried using a small timer or the printf() function to check the values of the variables?