ApplyAnimation.
#1

Hi,

I tried to put DANCE anim on OnPlayerRequestClass, but the anim don't execute! WHY?
Here is the anim code:
Код:
ApplyAnimation( playerid, "DANCING", "dnce_M_e", 4.1, 0, 0, 0, 0, 600, 1 );
??
Reply
#2

Try preloading the animation first:

pawn Код:
public OnPlayerConnect(playerid)
{
    PreloadAnimLib(playerid,"DANCING");
    return 1;
}

PreloadAnimLib(playerid, animlib[])//anywhere but in a callback
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
See if that helps.
Reply
#3

No it don't work

I put function PreloadAnimLib on where i have stock, and he don't work...
Reply
#4

Strange, check your parameters are correct.

https://sampwiki.blast.hk/wiki/ApplyAnimation
Reply
#5

Stigg told you anywhere but in a callback. next of the stock isn't in a callback
Reply
#6

Yes i put PreloadAnimLib in OnPlayerRequestClass but it give me some errors...
Reply
#7

Put the animation after SetPlayerPos, SetPlayerPos clears the animation.
Reply
#8

Yes it works thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)