SA-MP Forums Archive
Vehicle rotation - 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: Vehicle rotation (/showthread.php?tid=316021)



Vehicle rotation - lorigio - 05.02.2012

How i can do this with vehicle?
[ame]http://www.youtube.com/watch?v=76MIkBZOyT0[/ame]

I trayed with timer every 100ms using setvehiclezangle but with bad results.


Re: Vehicle rotation - HuSs3n - 05.02.2012

https://sampwiki.blast.hk/wiki/SetVehicleAngularVelocity

Код:
if (!strcmp("/spin", cmdtext))
{
	if(IsPlayerInAnyVehicle(playerid))
        SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
	return 1;
}



Re: Vehicle rotation - lorigio - 05.02.2012

//edit it works


Re: Vehicle rotation - HuSs3n - 05.02.2012

idk if that will work
try

Код:
    new Float:zangle;
    new v = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(v, zangle);
    if(zangle == 45)
    {
          SetVehicleAngularVelocity(v , 0.0, 0.0, 0.0);        
    }