All animations in an enum
#1

Using numbers for animations all over your code just ends up getting confusing, using the names would just be better.

Include here. The definitions are animlib_animname.
Reply
#2

uhm.. isnt that a little out of hand o.O
Reply
#3

What do you mean?

I'd prefer
pawn Код:
if ( animation == PED_WEAPON_CROUCH ) ..
over
pawn Код:
if ( animation == 1274 ) ..
Reply
#4

Really useful, great effort!
Reply
#5

Jeez how long did that take you?!
Reply
#6

Probably not too long.. It's mostly C&P from the wiki, I guess, so approx 2-3 hours.
Reply
#7

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Jeez how long did that take you?!
About 2 minutes.

pawn Код:
new szAnimLib[ 32 ], szAnimName[ 32 ];

print( "enum" );
print( "{" );

for ( new i = 0; i <= 1811; i++ )
{
    GetAnimationName( i, szAnimLib, sizeof( szAnimLib ), szAnimName, sizeof( szAnimName ) );
   
    printf( "%s_%s, // %d", szAnimLib, szAnimName, i );
}

print( "}" );
Reply
#8

Quote:
Originally Posted by g_aSlice
Посмотреть сообщение
About 2 minutes.

pawn Код:
new szAnimLib[ 32 ], szAnimName[ 32 ];

print( "enum" );
print( "{" );

for ( new i = 0; i <= 1811; i++ )
{
    GetAnimationName( i, szAnimLib, sizeof( szAnimLib ), szAnimName, sizeof( szAnimName ) );
   
    printf( "%s_%s, // %d", szAnimLib, szAnimName, i );
}

print( "}" );
That made me laugh, I didn't even think of that. I love the way your scripts are; very effective, short(mostly) and just amazing.

If I had to make this I'd probaly was copy and pasting from the wiki, I never even thought about your method lol.
Reply
#9

Quote:
Originally Posted by g_aSlice
Посмотреть сообщение
About 2 minutes.

pawn Код:
new szAnimLib[ 32 ], szAnimName[ 32 ];

print( "enum" );
print( "{" );

for ( new i = 0; i <= 1811; i++ )
{
    GetAnimationName( i, szAnimLib, sizeof( szAnimLib ), szAnimName, sizeof( szAnimName ) );
   
    printf( "%s_%s, // %d", szAnimLib, szAnimName, i );
}

print( "}" );
Marry me!

Seriously, I have never worked with animations, but that was one of the smartest codes I have ever seen. Add indentation!
Reply
#10

Quote:
Originally Posted by Miguel
Посмотреть сообщение
Marry me!

Seriously, I have never worked with animations, but that was one of the smartest codes I have ever seen. Add indentation!
I'll marry you only if I get to keep my last name!
Thanks, btw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)