GetPlayerName on Dialog?
#1

Hi, I'm having an issue with a command. Basicly what I'm trying to do is make a command which shows me names of all players in an event. It works fine with SendClientMessage, but fills my chat with names, and I don't want that. So I decided to put those names on a Dialog, but it just shows one name.

Here is my code:

pawn Код:
if(strcmp(cmdtext,"/seeplayers",true) == 0)
{
       
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(InEvent[i] == 1))
    {
        new name[MAX_PLAYER_NAME], string[50+MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));
        format(string, sizeof(string), " - %s", name);
        ShowPlayerDialog(playerid,MY_DIALOG_ID, DIALOG_STYLE_MSGBOX, "Players in Event", string, "Ok", "");//My Dialog
       
    }
    }
    }
   return 1;
}
Any help would be appreciated.
Thanks in advance.
Reply


Messages In This Thread
GetPlayerName on Dialog? - by Morten_Guado - 31.03.2013, 19:46
Re: GetPlayerName on Dialog? - by Harti - 31.03.2013, 19:49
Re: GetPlayerName on Dialog? - by Morten_Guado - 31.03.2013, 19:56
Re: GetPlayerName on Dialog? - by Morten_Guado - 31.03.2013, 20:00
Re: GetPlayerName on Dialog? - by Harti - 31.03.2013, 20:01
Re: GetPlayerName on Dialog? - by Windrush - 31.03.2013, 20:02
Re: GetPlayerName on Dialog? - by Morten_Guado - 31.03.2013, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)