[HELP] Animations
#1

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?
Reply
#2

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

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.
Reply
#4

Library MISC
Idle_Chat_02

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

:]
Reply
#5

OnPlayerText
ApplyAnimation
Timer
ClearAnimations
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)