Przejdź do głównej zawartości

GetActorAnimation

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Get the animation the actor is currently performing.

NameDescription
actoridThe ID of the actor to get the animation of.
animationLibrary[]An array into which to store the animationLibrary in, passed by reference.
librarySizeThe size of the animationLibrary array.
animationName[]An array into which to store the animationName in, passed by reference.
nameSizeThe size of the animationName array.
&Float:deltaA float variable into which to store the delta in, passed by reference.
&bool:loopA boolean variable into which to store the loop in, passed by reference.
&bool:lockXA float variable into which to store the lockX in, passed by reference.
&bool:lockYA float variable into which to store the lockY in, passed by reference.
&bool:freezeA boolean variable into which to store the freeze in, passed by reference.
&timeA variable into which to store the time in, passed by reference.

Return Values

Returns true if the actor is valid, otherwise returns false.

Examples

new gMyActor;

public OnGameModeInit()
{
gMyActor = CreateActor(179, 1153.9640, -1772.3915, 16.5920, 0.0000);
ApplyActorAnimation(gMyActor, "PED", "IDLE_CHAT", 4.1, true, true, true, true, 0);

new animationLibrary[32],
animationName[32],
Float:delta,
bool:loop,
bool:lockX,
bool:lockY,
bool:freeze,
time;

GetActorAnimation(gMyActor, animationLibrary, sizeof animationLibrary, animationName, sizeof animationName, delta, loop, lockX, lockY, freeze, time);
return 1;
}