dcmd_admins(playerid, params[])
{
#pragma unused params
SendClientMessage(playerid, COLOR_ORANGE, "|Brasil Next Life administracгo presentes-|");
for(new i = 0; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pAdmin] >= 1 && Player[i][pAdmin] < 8)
{
if(AdminAfk[i] == 1)
{
format(thestring, 128, "(%d) %s (%s) (AFK)",i ,Player[i][pName], AccountName(i));
SendClientMessage(playerid, COLOR_GREEN, thestring);
}
else if(AdminDuty[i] == 1)
{
format(thestring, 128, "(%d) %s (%s) (Em serviзo)",i ,Player[i][pName], AccountName(i));
SendClientMessage(playerid, COLOR_YELLOW, thestring);
}
else if(noevento[i] == true)
{
format(thestring, 128, "(%d) %s (%s) (Em evento)",i ,Player[i][pName], AccountName(i));
SendClientMessage(playerid, COLOR_GREEN, thestring);
}
else if(noteste[i] == true)
{
format(thestring, 128, "(%d) %s (%s) (Em teste)",i ,Player[i][pName], AccountName(i));
SendClientMessage(playerid, COLOR_GREEN, thestring);
}
else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
{
format(thestring, 128, "(%d) %s (%s)",i ,Player[i][pName], AccountName(i));
SendClientMessage(playerid, COLOR_WHITE, thestring);
}
}
}
}
return 1;
}
dcmd_admins(playerid, params[])
{
#pragma unused params
new fstring[256], count = 0;
for(new i = 0; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pAdmin] >= 1 && Player[i][pAdmin] < 8)
{
if(AdminAfk[i] == 1)
{
format(fstring, sizeof(fstring), "(%d) %s (%s) (AFK)\n",i ,Player[i][pName], AccountName(i));
strcat(string, fstring, sizeof(string));
}
else if(AdminDuty[i] == 1)
{
format(fstring, sizeof(fstring), "(%d) %s (%s) (trabalhando)\n",i ,Player[i][pName], AccountName(i));
strcat(string, fstring, sizeof(string));
}
else if(noevento[i] == true)
{
format(fstring, sizeof(fstring), "(%d) %s (%s) (Em evento)\n",i ,Player[i][pName], AccountName(i));
strcat(string, fstring, sizeof(string));
}
else if(noteste[i] == true)
{
format(fstring, sizeof(fstring), "(%d) %s (%s) (Em teste)\n",i ,Player[i][pName], AccountName(i));
strcat(string, fstring, sizeof(string));
}
else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
{
format(fstring, sizeof(fstring), 128, "(%d) %s (%s)\n",i ,Player[i][pName], AccountName(i));
strcat(string, fstring, sizeof(string));
}
count++;
}
}
}
if(count == 0)
{
ShowPlayerDialog(playerid, 2563, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", "\tNгo hб ADM's online no momento.\n\n", "OK", "");
}
else
{
ShowPlayerDialog(playerid, 2563, DIALOG_STYLE_MSGBOX, ".:: - ADM's Online - ::.", string, "OK", "");
}
}
return 1;
}
strcat(string, fstring, sizeof(string));
pawn Код:
strcat sу tem 2 parametros... |
dcmd_admins(playerid, params[])
{
#pragma unused params
new adialog[3000];
for(new i = 0; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
if(Player[i][pAdmin] >= 1 || Player[i][pAdmin] < 8)
{
if(AdminAfk[i] == 1)
{
format(thestring, 128, "(%d) %s (%s) (AFK)",i ,Player[i][pName], AccountName(i));
strcat(adialog,thestring);
}
else if(AdminDuty[i] == 1)
{
format(thestring, 128, "(%d) %s (%s) (Em serviзo)",i ,Player[i][pName], AccountName(i));
strcat(adialog,thestring);
}
else if(noevento[i] == true)
{
format(thestring, 128, "(%d) %s (%s) (Em evento)",i ,Player[i][pName], AccountName(i));
strcat(adialog,thestring);
}
else if(noteste[i] == true)
{
format(thestring, 128, "(%d) %s (%s) (Em teste)",i ,Player[i][pName], AccountName(i));
strcat(adialog,thestring);
}
else if(AdminDuty[i] == 0 && AdminAfk[i] == 0)
{
format(thestring, 128, "(%d) %s (%s)",i ,Player[i][pName], AccountName(i));
strcat(adialog,thestring);
}
ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,"|Brasil Next Life administracгo presentes-|",adialog,"FECHAR","");
}
}
}
return 1;
}