09.06.2017, 09:38
You have set the anim to loop, so it won't end. https://sampwiki.blast.hk/wiki/ApplyAnimation
If you want to stop an animnation without creating a command you can;
or set a timer that will stop the animnation.
If you want to stop an animnation without creating a command you can;
PHP код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4, 0, 0, 0, 0, 0, 1);
}
return 1;
}
PHP код:
forward StopAnim(playerid);
public StopAnim(playerid)
{
ApplyPlayerAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
return 1;
}
CMD:chat(playerid, params[])//I don't know your OnPlayerText code
{
ApplyPlayerAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,1,1);
SetTimer("StopAnim", 5000, false);
return 1;
}