25.02.2015, 06:56
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
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
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
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