SA-MP Forums Archive
[HELP] Animations - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Animations (/showthread.php?tid=114478)



[HELP] Animations - AcId n RaPiD - 19.12.2009

I was looking around but found nothing... It was something like I wanted it so that when a player speaks on the chat it will play a certain animation (the talking animation).

So lets say he types...

"Hai I'm cool".

It will play the animation for 3 seconds depending on the length of the message. If you know how to do this can you please help?


Re: [HELP] Animations - DeltaAirlines12 - 19.12.2009

Use these:
https://sampwiki.blast.hk/wiki/SetTimer
and OnplayerCommandText, don't use the "/" in front, just type the word.



Re: [HELP] Animations - AcId n RaPiD - 20.12.2009

No... What I meant was that when a player chats and types what ever, it'll play the talking animation. If you get what I mean :S.


Re: [HELP] Animations - saiberfun - 20.12.2009

Library MISC
Idle_Chat_02

I guess thats what u need
and
u should use it under
https://sampwiki.blast.hk/wiki/OnPlayerText

:]


Re: [HELP] Animations - miokie - 20.12.2009

OnPlayerText
ApplyAnimation
Timer
ClearAnimations


Re: [HELP] Animations - Djiango - 20.12.2009

pawn Код:
public OnPlayerText(playerid, text[])
{
    new Time = strlen(text);//Get lenght of text
    if(IsPlayerInAnyVehicle(playerid)) ApplyAnimation(playerid,"CAR_CHAT","CAR_Sc3_FL",4.1,1,1,1,0,Time*100);//lenght * 100 millisec
    else ApplyAnimation(playerid,"MISC","Idle_Chat_02",4.1,1,1,1,0,Time*100);
    return 1;
}
OnPlayerKeyStateChange. For skipping animation with KEY_FIRE onfoot & HANDBRAKE in a vehicle!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_HANDBRAKE && IsPlayerInAnyVehicle(playerid))
    {
        ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
        return 1;
    }
    else if(newkeys & KEY_FIRE)
    {
        ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
        return 1;
    }
    return 1;
}