Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| |||||
#1

-----
Reply
#2

i think this will fix it (im not sure, i never used animations for myself, but wiki ftw!)

pawn Код:
OnPlayerSpawn(playerid)
{
 ClearAnimations(playerid);

}
Reply
#3

Didnt used animations often, too but I think you need to use

pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
and do you know that SetPlayerToTeamColor(playerid); is never called ? (In OnPlayerSpawn)
Reply
#4

0.0 i used all of this lol
Reply
#5

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Didnt used animations often, too but I think you need to use

pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
and do you know that SetPlayerToTeamColor(playerid); is never called ? (In OnPlayerSpawn)
And where is it called then?
Reply
#6

Quote:
Originally Posted by Mean
Посмотреть сообщение
And where is it called then?
Never because your OnPlayerSpawn code stops before it

The compiler doesnt give the "Unreachable code" error because gTeam[playerid] could be something else than TEAM_ARMY or TEAM_LSPD but that would never happen because you only have two teams

And I dont see that you used
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
Reply
#7

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Never because your OnPlayerSpawn code stops before it

The compiler doesnt give the "Unreachable code" error because gTeam[playerid] could be something else than TEAM_ARMY or TEAM_LSPD but that would never happen because you only have two teams

And I dont see that you used
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
I used it scrool up ^^^^^^^^^
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);//It is here||||||||||||||||||||||||
    return 1;
}
Reply
#8

Quote:
Originally Posted by Mean
Посмотреть сообщение
I used it scrool up ^^^^^^^^^
yes with SPECIAL_ACTION_DANCE2 but I suggested to try it with SPECIAL_ACTION_NONE to stop it afterwards in OnPlayerSpawn

pawn Код:
public OnPlayerSpawn(playerid)
{
    GameTextForPlayer(playerid, "Welcome to hell", 2000, 6);
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); //here I meant
    switch(gTeam[playerid])
    {
        case TEAM_ARMY:
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1553.3546, -1675.4446, 16.1953);
            GivePlayerWeapon(playerid, 26, 100);
            GivePlayerWeapon(playerid, 29, 500);
            GivePlayerWeapon(playerid, 30, 300);
            SetPlayerColor(playerid, COLOR_BRIGHTRED);        
        }
        case TEAM_LSPD:
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 116.6943, 1933.8201, 18.9704);
            GivePlayerWeapon(playerid, 27, 100);
            GivePlayerWeapon(playerid, 31, 300);
            GivePlayerWeapon(playerid, 35, 2);
            SetPlayerColor(playerid, COLOR_BLUE);
        }
        default:
            printf("*** OnPlayerSpawn: Team [%d] not defined!", gTeam[playerid]);
    }
    return 1;
}
Reply
#9

Thanks, it stops looping anim now =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)