Talk anim - 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: Talk anim (
/showthread.php?tid=471001)
Talk anim -
xdarren - 20.10.2013
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Length = strlen(text);
new aTime = Length*1000;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,0,0,1,aTime);
}
I want it to make like I wont get freezed and that animation will cancel it self after 3 seconds. The problem is, animation is going and going and going ... and I am frozen for certain time.
Re: Talk anim -
reckst4r - 20.10.2013
Try
PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Length = strlen(text);
new aTime = Length*1000;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,0,0,1,aTime);
TogglePlayerControllable(playerid, 1);
}
And then make a timer on 3 seconds that executes ClearAnimations(playerid);
Re: Talk anim -
xdarren - 20.10.2013
How do I make this time ? Can you help me with it too ?
Re: Talk anim -
iZN - 20.10.2013
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new Length = strlen(text);
new aTime = Length*1000;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,0,0,1,aTime);
TogglePlayerControllable(playerid, false);
SetTimerEx("ResetAnim", 3000, false, "i", playerid);
}
// Placing it anywhere
forward ResetAnim(playerid);
public ResetAnim(playerid)
{
TogglePlayerControllable(playerid, true);
ClearAnimations(playerid);
return true;
}
Re: Talk anim -
rickisme - 20.10.2013
You can use SCAnim function in SmartChat v3.2 by =WoR=Varth
https://sampforum.blast.hk/showthread.php?tid=269319
Re: Talk anim -
JohnRazer - 20.10.2013
How would I use this in a gamemode?