Hm.... Any Suggestions?
#1

There Are Alot Of Animations like "thrw_barl_thrw" How I make it like
pawn Код:
if (strcmp("/test", cmdtext, true) == 0)
{
       SetPlayerAnimation(playerid, thrw_barl_thrw, "Animation"); // No Idea
       return 1;
    }
    return 0;
}
So Then Player Can Apply The ANim Any Idea?
Reply
#2

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
There Are Alot Of Animations like "thrw_barl_thrw" How I make it like
pawn Код:
if (strcmp("/test", cmdtext, true) == 0)
{
       SetPlayerAnimation(playerid, thrw_barl_thrw, "Animation"); // No Idea
       return 1;
    }
    return 0;
}
So Then Player Can Apply The ANim Any Idea?
https://sampwiki.blast.hk/wiki/ApplyAnimation
https://sampwiki.blast.hk/wiki/Animations
https://sampwiki.blast.hk/wiki/SetPlayerSpecialAction
Reply
#3

What "PED" Means? and 4.1,1,1,1,1,1); ?
pawn Код:
,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
Reply
#4

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
What "PED" Means? and 4.1,1,1,1,1,1); ?
pawn Код:
,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
Read the links i provided.
Reply
#5

You LEave it you can't help me i saw there's nothing about ped or The numbers
Reply
#6

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
You LEave it you can't help me i saw there's nothing about ped or The numbers
You dont tell me what to do and you hav'nt read the links because that has everything you asked for, explained in detail. It's not my fault your brain is'nt taking it in.

pawn Код:
(playerid, animlib[], animname[], Float:fS, opt1, opt2, opt3, opt4, opt5)
Reply
#7

Take another look at the link Stigg provided you with: https://sampwiki.blast.hk/wiki/ApplyAnimation

It explains the parameters of the function.
  • playerid - the id of the player to apply the animation to
    animlib - the library the animation exists in
    animname - the name of the animation itself
    fS - speed for the animation to play (4.0 is commonly used)
    opt1 - Loop the animation? 1 for yes, 0 for no
    opt2 - restore the player x position when the animation finishes?
    opt3 - restore the player y position when the animation finishes?
    opt4 - freeze the player at the end of the animation?
    opt5 - timer for the animation. use 0 for a never-ending loop
So, the example code you provided:
pawn Код:
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  • playerid - the ID of the player
    "PED" - the library the animation is in
    "WALK_DRUNK" - the name of the animation
    4.1 - speed of the animation
    1 - looping the animation
    1 - restoring position at end of anim in x
    1 - restoring position at end of anim in y
    1 - freeze player at end of anim in position
    1 - 1 millisecond timer for the animation
For a list of the animations, check the other link by Stigg, https://sampwiki.blast.hk/wiki/Animations

The animlib (the library the animation is in) will be in larger text size and bold. You put those for the "animlib" parameter in the ApplyAnimation function. The literal name of the animation will be found under the animation library, and you will put those in the "animname" parameter in the ApplyAnimation function.
Reply
#8

Thanks Now I understand Thaks Grim
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)