CMD:admins(playerid, params[]) { new string[128], CountAdmins, Name[MAX_PLAYER_NAME]; foreach(Player, i) { GetPlayerName(i, Name, sizeof(Name)); if(PlayerInfo[playerid][AdminLevel] >= 1) { CountAdmins = 1; } } if(CountAdmins == 1) { SendClientMessage(playerid, 0xD8D8D8FF, "Reality Roleplay Online Administrators"); foreach(Player, i) { if(PlayerInfo[playerid][AdminLevel] >= 1) { format(string, sizeof(string), "Admin: %s (ID: %d) - Level: %d", Name, i, PlayerInfo[i][AdminLevel]); SendClientMessage(playerid, 0xD8D8D8FF, string); } } } if(CountAdmins == 0) SendClientMessage(playerid, 0xD8D8D8FF, "There are no admins online!"); CountAdmins = 0; return 1; }
CMD:admins(playerid, params[])
{
new string[128], CountAdmins, Name[MAX_PLAYER_NAME];
foreach(Player, i) {
GetPlayerName(i, Name, sizeof(Name));
if(PlayerInfo[playerid][AdminLevel] >= 1) {
CountAdmins = 1;
}
}
if(CountAdmins == 1) {
SendClientMessage(playerid, 0xD8D8D8FF, "Reality Roleplay Online Administrators");
foreach(Player, i) {
if(PlayerInfo[i][AdminLevel] >= 1) {
format(string, sizeof(string), "Admin: %s (ID: %d) - Level: %d", Name, i, PlayerInfo[i][AdminLevel]);
SendClientMessage(playerid, 0xD8D8D8FF, string);
}
}
}
if(CountAdmins == 0) SendClientMessage(playerid, 0xD8D8D8FF, "There are no admins online!");
CountAdmins = 0;
return 1;
}
if(PlayerInfo[i][AdminLevel] >= 1) {
CMD:admins(playerid, params[])
{
new string[128], CountAdmins, Name[MAX_PLAYER_NAME];
foreach(Player, i) {
GetPlayerName(i, Name, sizeof(Name));
if(PlayerInfo[i][AdminLevel] >= 1) {
CountAdmins = 1;
}
}
if(CountAdmins == 1) {
SendClientMessage(playerid, 0xD8D8D8FF, "Reality Roleplay Online Administrators");
foreach(Player, i) {
if(PlayerInfo[i][AdminLevel] >= 1) {
format(string, sizeof(string), "Admin: %s (ID: %d) - Level: %d", Name, i, PlayerInfo[i][AdminLevel]);
SendClientMessage(playerid, 0xD8D8D8FF, string);
}
}
}
if(CountAdmins == 0) SendClientMessage(playerid, 0xD8D8D8FF, "There are no admins online!");
CountAdmins = 0;
return 1;
}
But you forgot to change it from the start.
pawn Код:
|
CMD:admins(playerid, params[])
{
new string[128], CountAdmins, Name[MAX_PLAYER_NAME];
foreach(Player, i) {
GetPlayerName(i, Name, sizeof(Name));
if(PlayerInfo[i][AdminLevel] >= 1) {
CountAdmins = 1;
break;
}
}
if(CountAdmins == 1) {
SendClientMessage(playerid, 0xD8D8D8FF, "Reality Roleplay Online Administrators");
foreach(Player, i) {
if(PlayerInfo[i][AdminLevel] >= 1) {
format(string, sizeof(string), "Admin: %s (ID: %d) - Level: %d", Name, i, PlayerInfo[i][AdminLevel]);
SendClientMessage(playerid, 0xD8D8D8FF, string);
}
}
}
if(CountAdmins == 0) SendClientMessage(playerid, 0xD8D8D8FF, "There are no admins online!");
CountAdmins = 0;
return 1;
}