17.09.2011, 11:36
This is from my script...
pawn Код:
CMD:admins(playerid,params[])
{
#pragma unused params
new string[150],count = 0,AdminPos[30];
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PInfo[i][Level] >= 1)
{
if(PInfo[i][Level] == 1) AdminPos=""cwhite"VIP";
else if(PInfo[i][Level] == 2) AdminPos=""cyellow"Moderator";
else if(PInfo[i][Level] == 3) AdminPos=""cyellow"Administrator";
else if(PInfo[i][Level] == 4) AdminPos=""cgreen"Head Administrator";
else if(PInfo[i][Level] == 5) AdminPos=""cred"Owner";
format(string,sizeof(string),"%s"cgreen2"%s(ID:%d) "cyellow2"- "cblue"%s \n",string,GetPName(i),i,AdminPos);
ShowPlayerDialog(playerid,Adminsdialog,0,""cwhite"Admins Online",string,"OK","");
count++;
}
}
else if(count == 0)
{
ShowPlayerDialog(playerid,Adminsdialog,0,"Admins Online",""cred"No Admins Online!","OK","");
}
}
return 1;
}