SA-MP Forums Archive
SetVehicleVelocity doesn't work - 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)
+--- Thread: SetVehicleVelocity doesn't work (/showthread.php?tid=430777)



SetVehicleVelocity doesn't work - newbienoob - 15.04.2013

I have this codes;

pawn Код:
new Float:vPos[3];
GetVehicleVelocity(GetPlayerVehicleID(i), vPos[0],vPos[1],vPos[2]);
DestroyVehicle(GetPlayerVehicleID(i));
lastveh[i] = CreateVehicle(vChange[v][vmodel], pPos[0], pPos[1], pPos[2], pPos[3], 1 + random(127) + random(127), 1 + random(127) + random(127), -1);
SetVehicleVelocity(lastveh[i], vPos[0],vPos[1],vPos[2]);
SetVehicleVelocity seems like it doesn't work. It doesn't set my vehicle's velocity.


Re: SetVehicleVelocity doesn't work - Faisal_khan - 15.04.2013

You are returning the same co-ordinates.
pawn Код:
vPos[0],vPos[1],vPos[2]
EDIT:
NVM I was wrong I see you created another vehicle.


Re: SetVehicleVelocity doesn't work - Om3n - 15.04.2013

u can set velocity only to occupated vehicles. u need to put urself to vehicle at first. than u could be able to set velocity.


Re: SetVehicleVelocity doesn't work - newbienoob - 15.04.2013

Quote:
Originally Posted by Om3n
Посмотреть сообщение
u can set velocity only to occupated vehicles. u need to put urself to vehicle at first. than u could be able to set velocity.
Thanks.