Chat Animation
#1

Hi there,
I'd like to apply animation to player who said something to the local chat, this is what am I using currently:

ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1, 1,0, strlen(text) * 100);

But, I need that the player can move while the animation is applied, also, after the animation ends, I need his chat animation to be cleared.

Please, does someone know how to do this or which kind of animation should I use?

Thanks.
Reply
#2

PHP код:
ApplyAnimation(playerid"CARRY""crry_prtial"4000001); 
is the correct animation.
Reply
#3

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;
PHP код:
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
PRESSED(KEY_SECONDARY_ATTACK))
    {
        
ApplyAnimation(playerid"CARRY""crry_prtial"4000001);
    }
    return 
1;

or set a timer that will stop the animnation.

PHP код:
forward StopAnim(playerid);
public 
StopAnim(playerid)
{
    
ApplyPlayerAnimation(playerid"CARRY""crry_prtial"2.000000);
    return 
1;
}
CMD:chat(playeridparams[])//I don't know your OnPlayerText code
{
        
ApplyPlayerAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,1,1);
        
SetTimer("StopAnim"5000false);
    return 
1;

Reply
#4

thanks everybody
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)