23.11.2010, 14:16
pawn Код:
new
tmp[64],
string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(1 <= PlayerInfo[i][Level] <= 5)
{
if(IsPlayerAdmin(playerid)) AdmRank = "RCON Administrator";
else
switch(PlayerInfo[i][Level])
{
case 1: AdmRank = "Basic Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Mod";
case 4: AdmRank = "Admin";
case 5: AdmRank = "Owner";
}
format(tmp, sizeof(tmp), "%s [%s], ",PlayerName2(i), AdmRank)
strcat(string, tmp);
if ((i % 3) == 0) // This will print 3 names on one line and then move on to the next line
{
SendClientMessage(playerid, blue, string);
string[0] = EOS;
// Note: EOS = End Of String = '\0'
// It empties the string (so to say)
// This is needed for strcat to work correctly
}
count++;
}
}
}