SA-MP Forums Archive
Not work SetActorFacingAngle - 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: Not work SetActorFacingAngle (/showthread.php?tid=573216)



Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

PHP код:
GetActorFacingAngle(i,A);
SetActorFacingAngle(i,A+90); 
Why not work?

SetActorFacingAngle - change angle, BUT SKIN NOT SPINNING. WHY


Re: Not work SetActorFacingAngle - ihatetn931 - 05.05.2015

Are you making A a float?

pawn Код:
new Float:A;



Re: Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

PHP код:
new Float:A;
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,A+90);




Re: Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

PHP код:
new Float:A;
GetActorFacingAngle(0,A);
SetActorFacingAngle(0,A+90); 
not work too.


Re: Not work SetActorFacingAngle - ihatetn931 - 05.05.2015

PHP код:
new Float:A;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A+90);

That code will get the player facing angle then add 90 degrees to that.

Or you could do this

PHP код:
new Float:A+90;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A);




Re: Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

PHP код:
new Float:A;
SetPlayerFacingAngle(playerid,180);
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,180);

not work


Re: Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

Quote:
Originally Posted by ihatetn931
Посмотреть сообщение
PHP код:
new Float:A;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A+90);

That code will get the player facing angle then add 90 degrees to that.

Or you could do this

PHP код:
new Float:A+90;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A);

Not work


Re: Not work SetActorFacingAngle - ihatetn931 - 05.05.2015

Quote:
Originally Posted by DarkPower2
Посмотреть сообщение
PHP код:
new Float:A;
SetPlayerFacingAngle(playerid,180);
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,180);

not work
In that code A is not doing anything but storing the actor facing angle which you're not using

PHP код:
new Float:A//this is so we can store the angle we need
GetPlayerFacingAngle(i,A); //A now has the angle of the player
SetActorFacingAngle(i,A+180);//A has the player facing angle, we wanna add 180 degrees to that 
By adding a +90 to the Angle, it's adding 90 degress to that number that is stored in the A


Re: Not work SetActorFacingAngle - DarkPower2 - 05.05.2015

ihatetn931, you test? It not work too!


Re: Not work SetActorFacingAngle - ihatetn931 - 05.05.2015

May i ask why you're adding to the angle?

When you can just face the way you want the actor to be then do this

PHP код:
new Float:A
GetPlayerFacingAngle(playerid,A); 
for(new 
0counti++) 

    
SetActorFacingAngle(i,A);