21.12.2015, 02:13
PHP код:
CMD:admins(playerid, params[])
{
new string[1000];
new count = 0;
if(IsPlayerConnected(playerid))
{
sendername[MAX_PLAYER_NAME];
SendClientMessage(playerid, COLOR_TEAL, "----Admins Online----------------------------------------------------");
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(playerVariables[i][pAdminLevel] == 1)
{
format(string, sizeof(string), "(%d) %s - admin level 1", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 2)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 2", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 2", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 3)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 3", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 3", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 4)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 4", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 4", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 5)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 5", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 5", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 6)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 6", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 6", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 7)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - Founder", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - Founder", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
}
27320 if(count == 0)
{
SendClientMessage(playerid, COLOR_IN2,"* No admins online on the server.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
}
27327 else if(count == 1)
{
SendClientMessage(playerid, COLOR_IN2,"* Now are 1 admin online.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
}
27334 else if (count >= 2)
{
27336 format(string, sizeof(string), "* There are now %d admins online.", count);
SCM(playerid, COLOR_IN2, string);
SendClientMessage(playerid, COLOR_TEAL, "----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE, "Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL, "----------------------------------------------------------------------------");
}
}
return 1;
}
If Succes +rep for me