void AdminsChecker()
{
if (admins)
{
char admin_name[300][300];
FILE *file;
char path[512];
sprintf(path, "SAMPFUNCS\\admins.ini");
file = fopen(path, "r");
if (file)
{
for (int i = 0; i < 300; i++)
{
char buf[24];
if (fgets(buf, 300, file))
sscanf(buf, "%s", admin_name);
else
break;
}
}
fclose(file);
int count = 0;
for(int i = 0; i < SAMP_MAX_PLAYERS; i++)
{
if (SF->getSAMP()->getPlayers()->iIsListed != 0)
continue;
if (SF->getSAMP()->getPlayers()->pRemotePlayer == NULL)
continue;
for(int x = 0; x < 300; x++)
{
if(SF->getSAMP()->getPlayers()->GetPlayerName(i) == NULL || admin_name[x] == NULL)
break;
if(!strcmp(SF->getSAMP()->getPlayers()->GetPlayerName(i), admin_name[x]))
{
char buf[64];
sprintf( buf, "%s [ID: %d]", SF->getSAMP()->getPlayers()->GetPlayerName(i), i);
pFont->Print( buf, D3DCOLOR_ARGB( 255, 255, 165, 0 ), 1, SF->getRender()->getPresentationParameters()->BackBufferHeight-360+count*20, false );
count++;
}
}
}
if ( count == 0 ) pFont->Print( "Администраторов в сети нету", D3DCOLOR_ARGB( 255, 255, 165, 0 ), 1, SF->getRender()->getPresentationParameters()->BackBufferHeight-45, false );
}
}