SA-MP Forums Archive
ApplyAnimation. - 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: ApplyAnimation. (/showthread.php?tid=296826)



ApplyAnimation. - Edvin - 13.11.2011

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 );
??


Re: ApplyAnimation. - Stigg - 13.11.2011

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.


Re: ApplyAnimation. - Edvin - 13.11.2011

No it don't work

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


Re: ApplyAnimation. - Stigg - 13.11.2011

Strange, check your parameters are correct.

https://sampwiki.blast.hk/wiki/ApplyAnimation


Re: ApplyAnimation. - Kostas' - 13.11.2011

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


Re: ApplyAnimation. - Edvin - 13.11.2011

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


Re: ApplyAnimation. - IstuntmanI - 13.11.2011

Put the animation after SetPlayerPos, SetPlayerPos clears the animation.


Re: ApplyAnimation. - Edvin - 13.11.2011

Yes it works thanks