25.07.2010, 15:01
How to make this command to dialog.
Код:
if (strcmp(cmd, "/admins", true) == 0) // Admin list if they're online { new string[64],pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"ADMIN: %s has viewed admin list (/admins)",pName); SendClientMessageToAdmins(DARKPINK, string, 1); new count = 0; SendClientMessage(playerid, GREEN, "[Online Admins]"); for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { if(AccountInfo[i][AdminLevel] >= 1 && AccountInfo[i][AdminLevel] <= 5 && Hide[i] == 0) { GetPlayerName(i, sendername, sizeof(sendername)); format(string, 128, "Level %d [%i]%s", AccountInfo[i][AdminLevel],i,sendername); SendClientMessage(playerid, RED, string); count++; } } } if (count == 0) SendClientMessage(playerid,RED,"No admin online in the list"); SendClientMessage(playerid, GREEN, "[____________________________________]"); return 1; }