07.11.2011, 15:30
Retire a variavel count[MAX_PLAYERS] do inicio do GM e troque o atual comando de /admins por este:
Se der algum erro, me avise.
PHP код:
if(strcmp(cmd, "/admins", true) == 0)
{
SendClientMessage(playerid, 0x96D742AA, "Administradores conectados:");
new count;
for(new i, p = GetMaxPlayers(); i < p; i++)
{
if(!IsPlayerConnected(i) || !IsPlayerAdmin(i) || admin[i]) continue;
GetPlayerName(i, string, MAX_PLAYER_NAME);
format(string, 64, "~ %s [ID %d]", string, i);
SendClientMessage(playerid, 0xFFFFFFAA, string);
count++;
}
if(!count) SendClientMessage(playerid, 0xFFFFFFAA, "{FF0000}~> {FFFFFF}Nenhum administrador conectado ao servidor no momento!");
return 1;
}