CMD:admins(playerid, params[]) { new string[128], count = 0; SendClientMessage(playerid, -1, "** "orange"Online Administrators "white"**"); foreach(new i : Player) { if(User[i][accountLogged] == 1) { if(User[i][accountAdmin] >= 1) { format(string, sizeof(string), "(%d) %s - Level %d Admin", i, pName(i), User[i][accountAdmin]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); count++; } } } if(count == 0) return SendClientMessage(playerid, -1, "No administrators online at the server."); return 1; }
ShowPlayerDialog(playerid, 0 , DIALOG_STYLE_MSGBOX, "Online Administrators", string, "OK", "");
CMD:admins(playerid, params[])
{
new
string2 [ 200 ],
string [ 200 ],
admincount = 0;
foreach(new i : Player)
{
if(User[i][accountLogged] == 1)
{
if(User[i][accountAdmin] >= 1)
{
admincount++;
format(string2, sizeof(string2), "(%d). %s - [%d level]", admincount, pName(i), User[i][accountAdmin]);
strcat(string, string2);
}
}
}
if(admincount == 0) return SendClientMessage(playerid, -1, "There are no Administrators online at the moment.");
return 1;
}
Try this one:
PHP код:
|
CMD:admins(playerid, params[])
{
new Handle[560],string[80], count = 0;
SendClientMessage(playerid, -1, "** "orange"Online Administrators "white"**");
foreach(new i : Player)
{
if(User[i][accountLogged] == 1)
{
if(User[i][accountAdmin] >= 1)
{
format(string, sizeof(string), "(%d) %s - Level %d Admin", i, pName(i), User[i][accountAdmin]);
strcat(Handle, string);
//SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
count++;
}
}
}
if(count == 0) {
SendClientMessage(playerid, -1, "No administrators online at the server.");
}
else {
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Online Administrators", Handle, "Close", "");
}
return 1;
}
Here you go ;_;
PHP код:
|