31.01.2013, 08:47
everyone it is my /admins command it works fine now
but when ever i put it in dialoges it shows only one admin name not all admin name
please help me
Код:
CMD:admins(playerid,params[]) { new Count = 0; new string[100], n[MAX_PLAYER_NAME]; SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________"); for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][Level] > 0) { GetPlayerName(i,n,sizeof(n)); format(string,sizeof(string),"Level %d: %s (ID: %d) - %s", PlayerInfo[i][Level], n, i, GetRankFromLevel(i)); SendClientMessage(playerid, 0xFF0000FF, string); Count++; } } if(Count == 0) { SendClientMessage(playerid, 0xFF0000FF, "There Are No Administrators Online."); } SendClientMessage(playerid, 0x00FF00FF, "____________________________"); return 1; }
Код:
CMD:admins(playerid,params[]) { new Count = 0; new string[100], n[MAX_PLAYER_NAME]; SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________"); for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][Level] > 0) { GetPlayerName(i,n,sizeof(n)); format(string,sizeof(string),"Level %d: %s (ID: %d) - %s", PlayerInfo[i][Level], n, i, GetRankFromLevel(i)); ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", string, "ok", ""); Count++; } } if(Count == 0) { ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", "No admins online", "ok", ""); } return 1; }