SetActorFacingAngle

From SA-MP Wiki

Jump to: navigation, search

SetActorFacingAngle was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Set the facing angle of an actor.


Parameters:
(actorid, Float:ang)
actoridThe ID of the actor to set the facing angle of. Returned by CreateActor.
angThe facing angle to set for the actor.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The actor specified does not exist.


Image:32px-Circle-style-warning.png

Important
Note

Players will see actor's facing angle changed only when it is restreamed to them.


Image:32px-Ambox_warning_orange.png

Note

When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later.


new MyActor;
 
public OnGameModeInit()
{
    MyActor = CreateActor(...);
    return 1;
}
 
// Somewhere else
SetActorFacingAngle(MyActor, 180.0);

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages