Unfreezing after animation
#1

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(playerid1);
    
SetPlayerAttachedObject(playerid0235860.0649990.093999, -0.159999, -107.0999450.89999276.6999891.0000001.0000001.000000);
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
    
ClearAnimations(playerid1);
    return 
1;
}
forward PutDownCrate(playerid);
public 
PutDownCrate(playerid)
{
    
ClearAnimations(playerid1);
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_NONE);
    
RemovePlayerAttachedObject(playerid0);
    
ClearAnimations(playerid1);
    return 
1;

Somewhere up those timers are triggered with command, something like this:

Command for exampel /pickup:

PHP код:
{
        
ApplyAnimation(playerid"CARRY""liftup"4.001011);
        
SetTimerEx("PickUpCrate"1000false"i"playerid);

Reply
#2

Try with this:
PHP код:
ApplyAnimation(playerid"CARRY""liftup"4.001100); 
PHP код:
forward PickUpCrate(playerid); 
public 
PickUpCrate(playerid

    
ClearAnimations(playerid); 
    
SetPlayerAttachedObject(playerid0235860.0649990.093999, -0.159999, -107.0999450.89999276.6999891.0000001.0000001.000000); 
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
    return 
1

forward PutDownCrate(playerid); 
public 
PutDownCrate(playerid

    
ClearAnimations(playerid); 
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_NONE); 
    
RemovePlayerAttachedObject(playerid0); 
    return 
1

Reply
#3

Thank you very much, it works!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)