Player Selection Animation
#1

Hi, my Special Action and/or animation that I tried to apply to my characters when a player is on class selection isn't working.

I have tried special action + animations and my character just stands there...

Code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
    SetPlayerPos(playerid, spawnX, spawnY, spawnZ);
    if(prc_Moving[playerid] == false)
    {
        prc_Degree[playerid] = 0;
        prc_Timer[playerid] = SetTimerEx("MoveCamera", 75, true, "d", playerid);
        prc_Moving[playerid] = true;
    }
    return 1;
}
Any help?
Reply
#2

You mean this?
pawn Код:
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
Reply
#3

Well, I tried that, but nothing happened...
Reply
#4

maybe applying the animation after their position is set?
Reply
#5

pawn Код:
//something I found in vactions.pwn
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);

public OnPlayerConnect(playerid)
{   //loading the animation libraries
    PreloadAnimLib(playerid,"BOMBER");
    PreloadAnimLib(playerid,"RAPPING");
    PreloadAnimLib(playerid,"SHOP");
    PreloadAnimLib(playerid,"BEACH");
    PreloadAnimLib(playerid,"SMOKING");
    PreloadAnimLib(playerid,"FOOD");
    PreloadAnimLib(playerid,"ON_LOOKERS");
    PreloadAnimLib(playerid,"DEALER");
    PreloadAnimLib(playerid,"CRACK");
    PreloadAnimLib(playerid,"CARRY");
    PreloadAnimLib(playerid,"COP_AMBIENT");
    PreloadAnimLib(playerid,"PARK");
    PreloadAnimLib(playerid,"INT_HOUSE");
    PreloadAnimLib(playerid,"FOOD");
    PreloadAnimLib(playerid,"PED");
    //so the timer can be executed again
    PlayerInfo[playerid][SpawnDance] = true;
    ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //preventing a bug for the animation not being applied the first time OnPlayerRequestClass is called
    return 1;
}
Something I found from: https://sampforum.blast.hk/showthread.php?tid=90880
Reply
#6

You can either preload animations as suhrab stated above. Or you can use the ApplyAnimation function twice. It's just better to preload the animations in the end though.
Reply
#7

Still not working.. I have a moving camera.. Will that effect it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)