20.09.2014, 14:33
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);
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!