Talk anim
#1

Код:
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.
Reply
#2

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(playerid1);
        } 
And then make a timer on 3 seconds that executes ClearAnimations(playerid);
Reply
#3

How do I make this time ? Can you help me with it too ?
Reply
#4

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;
}
Reply
#5

You can use SCAnim function in SmartChat v3.2 by =WoR=Varth
https://sampforum.blast.hk/showthread.php?tid=269319
Reply
#6

How would I use this in a gamemode?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)