Chuyển tới nội dung chính

SetActorFacingAngle

cảnh báo

Đã thêm hàm trong phiên bản SA-MP 0.3.7. Mục này không hoạt động trên các phiên bản cũ hơn!

Description​

Set the facing angle of an actor.

NameDescription
actoridThe ID of the actor to set the facing angle of. Returned by CreateActor.
Float:angleThe facing angle to set for the actor.

Returns​

true - The function was executed successfully.

false - The function failed to execute. The actor specified does not exist.

Examples​

new MyActor;

public OnGameModeInit()
{
MyActor = CreateActor(38, 0.0, 0.0, 3.0, 90.0);
return 1;
}

// Somewhere else
SetActorFacingAngle(MyActor, 180.0);

Notes​

ghi chú

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.

cảnh báo

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