car model rotation HELP - 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: car model rotation HELP (
/showthread.php?tid=565042)
car model rotation HELP -
FenilX - 24.02.2015
Hi I need the parked car round rotating in z angle smoothly
Like we see car model rotating in GMM and in Otto, s carshowroom
On top of the stairs we see a car model rotating round
I we all saw that at single player
I need that in samp
Sorry for my bad english
Re: car model rotation HELP -
Antoniohl - 24.02.2015
explain more, you need the model? you're going to map it or what?
Re: car model rotation HELP -
-=Dar[K]Lord=- - 25.02.2015
You can by incrementing the CURRENT ROTATION by a very small amount and putting it in a timer. Remember rotation variablr should be a float and global variable...
An example
Код:
new Float:zrot = 50.0;// say 50 is the start declare it outside the function
forward UpdateVehicleAngle(vehicleid);
public UpdateVehicleAngle(vehicleid)
{
zrot += 0.002;
SetVehicleZAngle(vehicleid,zrot);
return 1;
}
/*timer*/
SetTimerEx("UpdateVehicleAngle",500,1,"d",vehicleid); // use this where you want to start updating the rotation
Remember pass the id of the vehicle you created at the position.
This will rotate car in 0.1 second by the current cars z rotation value plus some small value
so if you want slow rotation you can slow down the timer
1000millisec = 1 second
500millisec = 0.1 second
Re: car model rotation HELP -
FenilX - 04.03.2015
thanks let me check its working
Re: car model rotation HELP -
FenilX - 04.03.2015
Quote:
Originally Posted by Antoniohl
explain more, you need the model? you're going to map it or what?
|
it means rotating the car model
like in ottos car showroom
u hav seen in singleplayer
Re: car model rotation HELP -
Write - 04.03.2015
Use /save inside a vehicle and then go to your documents, gta san andreas userfiles and savingpositions.txt. The saved position including the angle should be at the very least.