ApplyAnimation -
Lajko1 - 09.10.2013
I just can't make it work, everything works fine now at my /mask command but why ApplyAnimation doesn't trigger first time when I write /mask, it trigger only second time+ ... why not first time?
pawn Code:
CMD:mask(playerid)
{
if(Masked[playerid] == 0)
{
Masked[playerid] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.1,0,0,0,0,0);
ShowPlayerNameTagForPlayer(i, playerid, 0);
SetPlayerAttachedObject(playerid, 1, 19037, 2, 0.104000, 0.028000, 0.001000, 83.700035, 89.199966, 1.000000,1.000000,1.000000,1.000000,0,0);
//AttachObjectToPlayer(Mask, playerid, 0.104000, 0.028000, 0.001000, 83.700035, 89.199966, 1.000000);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You put your Mask on!");
return 1;
}
else if(Masked[playerid] == 1)
{
Masked[playerid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You took your Mask off!");
return 1;
}
return 1;
}
here is the code I've made so far :P
Re: ApplyAnimation -
TonyII - 09.10.2013
I've had the same problems, I just do ClearAnimations(playerid); before I apply the animation, works with me.
Re: ApplyAnimation - Patrick - 09.10.2013
This
pawn Code:
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.1,0,0,0,0,0);
To
pawn Code:
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.1,0,0,0,0,1);
pawn Code:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
forcesync - Set to 1 to force playerid to sync animation with other players in all instances (optional).
Re: ApplyAnimation -
EiresJason - 09.10.2013
If Tony's and PDS' solutions do not work, try applying the animation twice.
That seems to be the only way to fix it, for me atleast.
Re: ApplyAnimation -
Lajko1 - 10.10.2013
None of these work :/
Re: ApplyAnimation -
xVIP3Rx - 10.10.2013
Try to set a timer when the player do it and apply the anim there ?
Re: ApplyAnimation -
Lidor124 - 10.10.2013
Try this:
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.1,0,0,1,0,1);
Re: ApplyAnimation -
Lajko1 - 10.10.2013
Ok I tried, but still same thing, in first attempt it won't apply anim but at second or more it apply anim, I was trying everything you said guys, but still nothing :/ any other ideas?
EDIT: I made it guys

I added 2x Apply animations with timers and now it's working perfect, thanks for help ^^
Re: ApplyAnimation -
***Niko*** - 10.10.2013
It should work like this also and its simple without any timers
Code:
OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);