Unfreezing after animation - 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)
+--- Thread: Unfreezing after animation (
/showthread.php?tid=643550)
Unfreezing after animation -
Saddin - 22.10.2017
After I do some animation and use special action feature, and when I clear animation the player just stand in one place and can't move. It's not frozen really until i jump or press left mouse button for attack. Is there any way to clear player after he do similiar animations and special actions?
PHP код:
forward PickUpCrate(playerid);
public PickUpCrate(playerid)
{
ClearAnimations(playerid, 1);
SetPlayerAttachedObject(playerid, 0, 2358, 6, 0.064999, 0.093999, -0.159999, -107.099945, 0.899992, 76.699989, 1.000000, 1.000000, 1.000000);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
ClearAnimations(playerid, 1);
return 1;
}
forward PutDownCrate(playerid);
public PutDownCrate(playerid)
{
ClearAnimations(playerid, 1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
RemovePlayerAttachedObject(playerid, 0);
ClearAnimations(playerid, 1);
return 1;
}
Somewhere up those timers are triggered with command, something like this:
Command for exampel /pickup:
PHP код:
{
ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 1, 0, 1, 1);
SetTimerEx("PickUpCrate", 1000, false, "i", playerid);
}
Re: Unfreezing after animation -
RIDE2DAY - 22.10.2017
Try with this:
PHP код:
ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 1, 1, 0, 0);
PHP код:
forward PickUpCrate(playerid);
public PickUpCrate(playerid)
{
ClearAnimations(playerid);
SetPlayerAttachedObject(playerid, 0, 2358, 6, 0.064999, 0.093999, -0.159999, -107.099945, 0.899992, 76.699989, 1.000000, 1.000000, 1.000000);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
return 1;
}
forward PutDownCrate(playerid);
public PutDownCrate(playerid)
{
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
RemovePlayerAttachedObject(playerid, 0);
return 1;
}
Re: Unfreezing after animation -
Saddin - 22.10.2017
Thank you very much, it works!