Animations
#3

I hope you get it. For more check: https://sampwiki.blast.hk/wiki/Animations.
There are just 3 examples of animations, you can add more.

PHP Code:
new Anims[ ][ AnimOption ] =
{
    { 
"Wave", "/wave" },
    { 
"Wank", "/wank" },
    { 
"Relax", "/relax" } // etc
};
enum AnimOption
{
    
AnName[ 100 ],
    
Command[ 32 ]
}
public 
OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
    switch( 
dialogid )
    {
        case 
DIALOG_ANIMS:
        {
            if( !
response )
                return 
1;
            switch( 
listitem )
            {
                case 
0: ApplyAnimation( playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0 ); // wave
                
case 1: ApplyAnimation( playerid, "PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600 ); // wank
                
case 2: ApplyAnimation( playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0 ); // relax
            
}
        }
        return 
1;
    }
    return 
0;
}
CMD:anims(playerid)
{
    new 
data[ 650 ];
    for( new 
i = 0; i < sizeof( Anims ); i ++ )
    {
        
format( data, sizeof( data ), "%s%s\t %s\n", data, Anims[ i ][ AnName ], Anims[ i ][ Command ] );
    }
    
ShowPlayerDialog( playerid, DIALOG_ANIMS, DIALOG_STYLE_LIST, "Animations:", data,  "Select", "Exit" );
    return 
1;
}
CMD:wave( playerid, params[ ] )
    return 
ApplyAnimation( playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0 );
CMD:wank( playerid, params[ ] )
    return 
ApplyAnimation( playerid, "PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600 );
CMD:relax( playerid, params[ ] )
    return 
ApplyAnimation( playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0 );
    
CMD:stopanim( playerid, params[ ] )
    return 
ClearAnimations( playerid ); 
EDIT:
- Sorry, i didn't see that someone already replied.
Reply


Messages In This Thread
Animations - by Hunud - 08.05.2018, 15:40
Re: Animations - by CrystalGamer - 08.05.2018, 15:50
Re: Animations - by FaLLenGirL - 08.05.2018, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)