Player Selection Animation -
(_AcE_) - 14.12.2011
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?
Re: Player Selection Animation - suhrab_mujeeb - 14.12.2011
You mean this?
pawn Код:
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
Re: Player Selection Animation -
(_AcE_) - 14.12.2011
Well, I tried that, but nothing happened...
Re: Player Selection Animation -
[ABK]Antonio - 14.12.2011
maybe applying the animation after their position is set?
Re: Player Selection Animation - suhrab_mujeeb - 14.12.2011
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
Re: Player Selection Animation -
Steven82 - 14.12.2011
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.
Re: Player Selection Animation -
(_AcE_) - 14.12.2011
Still not working.. I have a moving camera.. Will that effect it?