/admins some what problem
#4

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.

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;
}
Give this a shot. Another alternative is strcat:
https://sampwiki.blast.hk/wiki/strcat

EDIT: Nice LarzI
Reply


Messages In This Thread
/admins some what problem - by CBCandyBoy - 31.01.2013, 08:47
Re: /admins some what problem - by CBCandyBoy - 31.01.2013, 09:57
Re: /admins some what problem - by LarzI - 31.01.2013, 10:06
Re: /admins some what problem - by Threshold - 31.01.2013, 10:10
Re: /admins some what problem - by CBCandyBoy - 31.01.2013, 10:46
Re: /admins some what problem - by AndreT - 31.01.2013, 10:56
Re: /admins some what problem - by u3ber - 31.01.2013, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)