Keys sprint doesn't remove all animation after clear it
#1

Hello guys
i got one issue when i apply animation on my keys, just like this
Код:
    if(HOLDING( KEY_SPRINT))
    {
    if(PRESSED( KEY_JUMP ))
    {
    ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
    }
    }
    if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP))
	{
    if(GetPVarInt(playerid, "InfectPlayerBreak") == 1)
    {
	ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 0, 0);
	}
	}

	if(HOLDING(KEY_WALK) || HOLDING(KEY_SPRINT))
	{
	if(GetPVarInt(playerid, "InfectPlayerBreak") == 1 || IsPlayerRunning(playerid))
	{
	ApplyAnimation(playerid, "PED", "WALK_old", 4.1, 1, 1, 1, 0, 0);
	}
	}

	else if(RELEASED(KEY_WALK) || RELEASED(KEY_SPRINT))
	{
	if(GetPVarInt(playerid, "InfectPlayerBreak") == 1)
	{
    ClearAnimations(playerid);
	}
	}
	return true;
}
This stuff doesn't clear it after i put on me heal system. Its luck like this
Код:
stock CurePlayer(playerid)
{
	if(pInfo[playerid][IsPlayerInfected] == 1)
	{
	    KillTimer(pInfo[playerid][IsPlayerInfectedTimer]);
	    KillTimer(pInfo[playerid][IsPlayerBlindTimer]);
	    KillTimer(pInfo[playerid][IsPlayerBreakTimer]);
	    pInfo[playerid][IsPlayerInfected] = 0;
	    pInfo[playerid][IsPlayerBlind] = 0;
	    pInfo[playerid][IsPlayerBreak] = 0;
	    SetPlayerColor(playerid,COLOR_HUMAN);
		ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,1,1,1,1);
		SetPlayerDrunkLevel(playerid,0);
		TextDrawHideForPlayer(playerid,Infected[playerid]);
		TextDrawHideForPlayer(playerid,Break[playerid]);
		TextDrawHideForPlayer(playerid,Blind[playerid]);
	}
	return 1;
}
P.S this stock
Код:
stock InfectPlayerBreak(playerid)
{
	if(team[playerid] == TEAM_HUMAN)
	{
		if(pInfo[playerid][IsPlayerBreak] == 0)
		{
	        pInfo[playerid][IsPlayerBreakTimer] = SetTimerEx("StandardBreak",1500,1,"i",playerid);
			SetPlayerColor(playerid,COLOR_PINK);
			TextDrawShowForPlayer(playerid,Break[playerid]);
            SetPVarInt(playerid, "InfectPlayerBreak", 1);
            pInfo[playerid][IsPlayerInfected] = 1;
		}
	}
	return 1;
}
So when i put ClearAnimations(playerid); on stock cure its still don't disable me animation. Have any ideas?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)