20.11.2011, 14:46
pawn Code:
bool:IsARolePlayName ( const name [ ] )
{
new length = strlen ( name ),
last_underline = - 1;
if ( name [ length - 1 ] == 0x5F )
return false;
while ( length -- )
{
if ( name [ length ] == 0x5F )
{
if ( last_underline == length + 1 )
return false;
last_underline = length;
continue;
}
if ( !( 0x40 < name [ length ] < 0x5B || 0x60 < name [ length ] < 0x7B ) )
{
return false;
}
}
return last_underline > 0;
}