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;
}
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;
}
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;
}
IsCrounching(playerid)
return (GetPlayerAnimationIndex(playerid) == 1159 || GetPlayerAnimationIndex(playerid) == 1274 ? true : false);
forward ClearAnimations(playerid);
public ClearAnimations(playerid)
{
if(IsCrounching(playerid))
ApplyAnimation(playerid, "PED", "GUNCROUCHFWD", 4.1, 0, 0, 0, 0, 1, 1);
else
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.1, 0, 0, 0, 0, 0);
return 1;
}
|
What I used to clearn anim:
PHP код:
|
|
Well its no a bug i think, just want to stop the dumb animation after i clear it bat ClearAnimations do nothing so i think i need stop it somehow different
|
|
Lol..
Just try implementing some debug codes ( print("Test 1"); print("Test 2"); ) following your code, so the console will say you where the code stops and then you can make an idea yourself about what's wrong in your code. |