Quote:
Originally Posted by Shinja
You are checking Admin[playerid], and you must check if the player connected also
also, you do (Admin[i] >= 0), also non admins will be formatted here is the right code
increase string size a little bit more
PHP код:
CMD:admins(playerid){
new string[300];
new fstring[64];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Admin[i] > 0 && IsPlayerConnected(i))
{
GetPlayerName(i,adminname, sizeof(adminname));
format(fstring, sizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n", adminname, i,Admin[i]);
strcat(string, fstring, sizeof(string));
}
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins",string,"OK","");
return 1;
}
|
I put the code but when you try it on the server I get: unknown command