SA-MP Forums Archive
Animations at Player Selection? - 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: Animations at Player Selection? (/showthread.php?tid=78590)



Animations at Player Selection? - Littleman774 - 21.05.2009

Hello Again
Do you know how I can get Anims at Skin Selection?
Lets say I want all my skins to /crossarms.

Thanks for the Answers


Re: Animations at Player Selection? - Correlli - 21.05.2009

Play the animation at OnPlayerRequestClass callback.
Here is the list of animations: https://sampwiki.blast.hk/wiki/Animations


Re: Animations at Player Selection? - Littleman774 - 21.05.2009

Quote:
Originally Posted by Don Correlli
Play the animation at OnPlayerRequestClass callback.
Here is the list of animations: https://sampwiki.blast.hk/wiki/Animations
This is the first time I do this with anims, how should I write it down?


Re: Animations at Player Selection? - member - 21.05.2009

Here's an example of what he means:

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
      case 0:
      {
        GameTextForPlayer(playerid,"~n~~n~~n~~g~Class 1",3000,3);
            {
            SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -1426.575805, 23.959726, 14.148437);
                SetPlayerFacingAngle(playerid, 219.106613);
                SetPlayerCameraPos(playerid, -1423.829833, 20.462652, 14.148437);
                SetPlayerCameraLookAt(playerid, -1426.575805, 23.959726, 14.148437);
                ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Example Animation
             }
      }
      case 1:
      {
            GameTextForPlayer(playerid,"~n~~n~~n~~b~Class 2",3000,3);
            {
            SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -1426.575805, 23.959726, 14.148437);
                SetPlayerFacingAngle(playerid, 219.106613);
                SetPlayerCameraPos(playerid, -1423.829833, 20.462652, 14.148437);
                SetPlayerCameraLookAt(playerid, -1426.575805, 23.959726, 14.148437);
                ApplyAnimation(playerid,"PLAYIDLES","TIME",4.1,1,1,1,1,1); // Example Animation
             }
      }
    }
    return 1;
}



Re: Animations at Player Selection? - Littleman774 - 21.05.2009

Quote:
Originally Posted by [B2K
Hustler ]
Here's an example of what he means:

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
      case 0:
      {
        GameTextForPlayer(playerid,"~n~~n~~n~~g~Class 1",3000,3);
            {
            SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -1426.575805, 23.959726, 14.148437);
                SetPlayerFacingAngle(playerid, 219.106613);
                SetPlayerCameraPos(playerid, -1423.829833, 20.462652, 14.148437);
                SetPlayerCameraLookAt(playerid, -1426.575805, 23.959726, 14.148437);
                ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Example Animation
             }
      }
      case 1:
      {
            GameTextForPlayer(playerid,"~n~~n~~n~~b~Class 2",3000,3);
            {
            SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -1426.575805, 23.959726, 14.148437);
                SetPlayerFacingAngle(playerid, 219.106613);
                SetPlayerCameraPos(playerid, -1423.829833, 20.462652, 14.148437);
                SetPlayerCameraLookAt(playerid, -1426.575805, 23.959726, 14.148437);
                ApplyAnimation(playerid,"PLAYIDLES","TIME",4.1,1,1,1,1,1); // Example Animation
             }
      }
    }
    return 1;
}
Thanks everyone