22.12.2011, 16:25
Is this what you mean?
pawn Код:
CMD:admins(playerid)
{
new str[128], thename[MAX_PLAYER];
for(new i; i<=MAX_PLAYERS; i++) //create a loop
{
switch(Pinfo[i][pLevel]) //Using a switch just because it's easier and I heard it's better for performance
{
case 1: //level 1
{
GetPlayerName(i, thename, sizeof(thename)); //get their names
format(str, sizeof(str), "Level 1: %s - Test", thename); //format our string so we can send it
SendClientMessage(playerid, 0x00CC00AA, str); //Send it
}
case 2: //level 2
{
GetPlayerName(i, thename, sizeof(thename)); //get their names
format(str, sizeof(str), "Level 2: %s - Moderator", thename); //format our string so we can send it
SendClientMessage(playerid, 0x00CC00AA, str); //Send it
}
case 3: //level 3
{
GetPlayerName(i, thename, sizeof(thename)); //get their names
format(str, sizeof(str), "Level 3: %s - Administrator", thename); //format our string so we can send it
SendClientMessage(playerid, 0x00CC00AA, str); //Send it
}
case 4: //level 4
{
GetPlayerName(i, thename, sizeof(thename)); //get their names
format(str, sizeof(str), "Level 4: %s - Owner", thename); //format our string so we can send it
SendClientMessage(playerid, 0x00CC00AA, str); //Send it
}
}
}
return 1;
}