//Command
new
MaxPlayers = GetMaxPlayers(),
string[128];
for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 1) continue;
{
format(string, 128, "Helper level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
SendClientMessage(playerid, 0x99CCCCAA, string);
}
for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 2) continue;
{
format(string, 128, "Global Tester level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
SendClientMessage(playerid, 0x99CCCCAA, string);
}
for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 3) continue;
{
format(string, 128, "Moderator level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
SendClientMessage(playerid, 0x99CCCCAA, string);
}
for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 4) continue;
{
format(string, 128, "Admin level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
SendClientMessage(playerid, 0x99CCCCAA, string);
}
//......
stock pName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
Originally Posted by Niixie
Phento, you dont need to make a loop each time and again. once is good.
|
Originally Posted by ■■ DokerJr ■■
Example:
Admin 1 ******* Admin 2 ******* Admin 3 ******* Admin 4 ******* etc ... |