31.01.2013, 10:10
Obviously when using ShowPlayerDialog you need to create one large string, rather than multiple strings. As ShowPlayerDialog can only show a single string at once.
Give this a shot. Another alternative is strcat:
https://sampwiki.blast.hk/wiki/strcat
EDIT: Nice LarzI
pawn Код:
CMD:admins(playerid,params[])
{
new Count = 0;
new n[MAX_PLAYER_NAME];
new string[1000];
SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][Level] < 1) continue;
GetPlayerName(i,n,sizeof(n));
format(string,sizeof(string),"%sLevel %d: %s (ID: %d) - %s\n", string, PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
Count++;
}
if(Count == 0)
{
ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", "No admins online", "ok", "");
return 1;
}
ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "online admins..", string, "ok", "");
return 1;
}
https://sampwiki.blast.hk/wiki/strcat
EDIT: Nice LarzI
![Cheesy](images/smilies/biggrin.png)