23.02.2013, 11:36
I'm confused that this code below doesn't work.
It shows the gametext, but it doesn't apply the animation
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.
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;
}
EDIT: Do I need to put SetPlayerPos before ApplyAnimation?
EDIT2: The problem is solved. I need to use SetPlayerPos before ApplyAnimation.