22.10.2017, 11:23
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?
Somewhere up those timers are triggered with command, something like this:
Command for exampel /pickup:
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;
}
Command for exampel /pickup:
PHP код:
{
ApplyAnimation(playerid, "CARRY", "liftup", 4.0, 0, 1, 0, 1, 1);
SetTimerEx("PickUpCrate", 1000, false, "i", playerid);
}