help with names of more than 1 player
#5

Loop through all players.

IsPlayerConnected(playerVar);

IsPlayerAdmin(playerVar)

Display Name Here!
(Do not show dialog here! show it out of the loop!)
Close Bracket

Close Bracket
ShowPlayerDialog(Yourdialog);
pawn Код:
new string[128] = ""; // Do not decrease this because it's the whole string including the names! Not 1 name!

for(new i; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(IsPlayerAdmin(i))
        {
            new name[MAX_PLAYER_NAME+1], str[50];
            GetPlayerName(i, name, sizeof(name));
            format(str, sizeof str, "%s (%d)\n", name, i);
            strcat(string, str);
        }
    }
}

ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Admin Online", string, "OK", "");
//This is NOT by made by me. Made by ABOVE poster!
Reply


Messages In This Thread
help with names of more than 1 player - by PMH - 20.09.2014, 12:38
Re: help with names of more than 1 player - by PMH - 20.09.2014, 13:30
Re: help with names of more than 1 player - by VishvaJeet - 20.09.2014, 13:45
Re: help with names of more than 1 player - by rickisme - 20.09.2014, 13:47
Re: help with names of more than 1 player - by DaniceMcHarley - 20.09.2014, 14:33
Re: help with names of more than 1 player - by PMH - 20.09.2014, 18:41

Forum Jump:


Users browsing this thread: 1 Guest(s)