17.11.2011, 00:42
pawn Код:
if( strcmp( cmd, "/lideres", true ) == 0 )
{
new
countliders
;
SendClientMessage( playerid, -1, "[BDP] Lнderes Online:" );
for( new l = 0; l < MAX_PLAYERS; l++ ) // <<< aqui
{
if( IsPlayerConnected( l ))
{
new
msg[ 64 ]
;
format( pFile, sizeof( pFile ), "clas/%s.ini", PlayerName( i ));
if( dini_Exists( pFile ))
{
if( strcmp( dini_Get( pFile, "cla" ), "Nenhum", false ))
{
new
formy[ 128 ]
;
format( formy, sizeof( formy ), "clas/%s.ini", dini_Get( pFile, "cla" ));
if( strcmp( dini_Get( formy, "Dono" ), PlayerName( i ), true ) == 0 )
{
countliders ++;
format( msg, sizeof( msg ), "[BDP] Lнder %s | Clг %s", PlayerName( i ), dini_Get( pFile, "cla" ));
SendClientMessage( playerid, -1, msg );
}
}
}
}
}
if( countliders <= 0 ) return SendClientMessage( playerid, -1, "[BDP] Nenhum lнder online");
return 1;
}
stock PlayerName( playerid )
{
new gName[MAX_PLAYER_NAME+1];
GetPlayerName( playerid, gName, sizeof(gName));
return gName;
}