Need help with animation freezing -
Zigonja - 28.06.2013
Okay, so I've copied Function from SAMP scripting site, and added my animation to it, this is how it looks like
pawn Код:
forward woodagain(playerid);
public woodagain(playerid)
{
ApplyAnimation(playerid,"ped","BIKE_pickupL",4.1,0,0,0,1,1,1);
SetPlayerCheckpoint(playerid, 2629.5989, -433.7548, 65.3618, 3.0);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
}
Now, after the anim ends it freezes me in place, I know it's "freeze Will freeze the player in position after the animation finishes."
But! If I set it to 0, the animation won't start up.
I had an idea of setting player position z+0.01 but, it looked abut odd.
Respuesta: Need help with animation freezing -
CIzaquita - 28.06.2013
Try this:
pawn Код:
forward woodagain(playerid);
public woodagain(playerid)
{
ApplyAnimation(playerid,"ped","BIKE_pickupL",4.1,0,0,0,1,1,1);
SetPlayerCheckpoint(playerid, 2629.5989, -433.7548, 65.3618, 3.0);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
TogglePlayerControllable(playerid, 1);
}
Re: Need help with animation freezing -
Zigonja - 29.06.2013
Nope didn't fix it sadly :/
Re: Need help with animation freezing -
GODEX - 29.06.2013
This may help you i dont know, Havent tested it. PM me if you get anymore issues
Код:
forward woodagain(playerid);
public woodagain(playerid)
{
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid,"ped","BIKE_pickupL",4.1,0,0,0,1,1,1);
SetPlayerCheckpoint(playerid, 2629.5989, -433.7548, 65.3618, 3.0);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}
Re: Need help with animation freezing -
iceCupa - 29.06.2013
I suppose you could use "ClearAnimations" here, not sure though
pawn Код:
forward StopAnimation();
forward woodagain(playerid);
public woodagain(playerid)
{
ApplyAnimation(playerid,"ped","BIKE_pickupL",4.1,0,0,0,1,1,1);
SetTimer("StopAnimation",8000,0); // change this to whatever the anim time is
SetPlayerCheckpoint(playerid, 2629.5989, -433.7548, 65.3618, 3.0);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
TogglePlayerControllable(playerid, 1);
}
public StopAnimation(playerid) //somewhere outside all functions preferably at the end
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerControllable(i,1);
ClearAnimation(i);
}
}
}