ApplyAnimation freeze problem :( - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ApplyAnimation freeze problem :( (
/showthread.php?tid=183609)
ApplyAnimation freeze problem :( -
MJ! - 16.10.2010
pawn Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
I have the next Animation:
pawn Код:
ApplyAnimation(playerid,
"PED", // animlib
"GUN_STAND", // animname
4.1, // fDelta
0, // loop
1, // lockX
1, // lockY
1, // freeze
1, // time
1); // forcesync
After the animation finishes, the player remain blocked in that animation:
/imageshack/img214/7668/badx.png
But if i set freeze to 0, the animation wouldn't be applyed, the player only moves a bit the hands, and that's all ...
How can I do like when the animation finishes, the player to don't be blocked ?
After the animation finish,
Re: ApplyAnimation freeze problem :( -
iggy1 - 16.10.2010
I think with some animations you have to use 'ClearAnimations' or it won't stop. (not %100 sure but i think so)
Re: ApplyAnimation freeze problem :( -
MJ! - 16.10.2010
Nope, if i use freeze = 1, ClearAnimations() won't work
Respuesta: ApplyAnimation freeze problem :( -
MaRcOsWeB - 06.03.2011
You could use this:
pawn Код:
// at the top
forward StopAnimation();
// When the player use the animation (Command or something like that)
ApplyAnimation(playerid,"PED", "GUN_STAND",4.1, 0, 1, 1, 1, 1, 1);
SetTimer("StopAnimation",5000,0); // Change the interval (5000) to the animation's during time...
// at the bottom
public StopAnimation(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i,1);
ClearAnimation(i);
}
}
}
Sorry for my bad english, good luck.
Grettings from Argentina