Animation not stopping. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Animation not stopping. (
/showthread.php?tid=348817)
Animation not stopping. -
milanosie - 06.06.2012
hello, I want this animation to stop after chat amount of time,
But it just continues forever and ever.
what am I doing wrong?
pawn Код:
new Len = strlen(text);
new chat = Len * 150;
new name[24], string[128], string2[128];
GetPlayerName(playerid, name, 24);
new acc[128];
GetAccent(playerid, acc, 128);
new Float:h;
GetPlayerHealth(playerid, h);
if(!IsPlayerInAnyVehicle(playerid) && isanim[playerid] == 0 && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK && ison911[playerid] != 1 && isoncall[playerid] == false && iscracked[playerid] == 0)
{
ApplyAnimation(playerid, "PED","IDLE_CHAT", 4.1, 0, 1, 1, 1, chat, 0);
SetTimerEx("StopTalk", chat, false, "i", playerid);
}
forward StopTalk(playerid);
public StopTalk(playerid)
{
ClearAnimations(playerid);
return 1;
}
Thanks guys, I'm probably missing something obvious though.