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



ApplyAnimation at OnPlayerRequestClass - greentarch - 23.02.2013

I'm confused that this code below doesn't work.
It shows the gametext, but it doesn't apply the animation
pawn Код:
public OnPlayerRequestClass( playerid, classid )
{
    switch ( classid )
    {
        case 0 .. 6 :
        {
            GameTextForPlayer( playerid, "~b~Police", 3000, 3 );
            gTeam[ playerid ] = TEAM_COP;
            ApplyAnimation( playerid, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1 ); // This doesn't work
            SetPlayerPos ....
        }
        default :
        {
            GameTextForPlayer( playerid, "~w~Civilian", 3000, 3 );
            gTeam[ playerid ] = TEAM_CIV;
            SetPlayerSpecialAction( playerid, SPECIAL_ACTION_HANDSUP ); // This doesn't work too
            SetPlayerPos ....
        }
    }
    return 1;
}
The code compiles successfully, but it doesn't shows the animation at the request class.

EDIT: Do I need to put SetPlayerPos before ApplyAnimation?
EDIT2: The problem is solved. I need to use SetPlayerPos before ApplyAnimation.


Re: ApplyAnimation at OnPlayerRequestClass - Goldino - 23.02.2013

What doesn't work?


Re: ApplyAnimation at OnPlayerRequestClass - Slavian - 23.02.2013

Can you tell me what is wont work ?