21.12.2015, 16:31
Hello!
Take this version, it should work:
Take this version, it should work:
PHP код:
CMD:admins(playerid,params[])
{
new count,string[145],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 ++;
}
else if(playerVariables[i][pAdminLevel] == 2)
{
format(string,sizeof string,"(%d) %s - admin level 2",i,sendername);
SendClientMessage(playerid,COLOR_WHITE,string);
count ++;
}
else if(playerVariables[i][pAdminLevel] == 3)
{
format(string,sizeof string,"(%d) %s - admin level 3",i,sendername);
SendClientMessage(playerid,COLOR_WHITE,string);
count ++;
}
else if(playerVariables[i][pAdminLevel] == 4)
{
format(string, sizeof(string), "(%d) %s - admin level 4", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else if(playerVariables[i][pAdminLevel] == 5)
{
format(string, sizeof(string), "(%d) %s - admin level 5", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else if(playerVariables[i][pAdminLevel] == 6)
{
format(string, sizeof(string), "(%d) %s - admin level 6", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else if(playerVariables[i][pAdminLevel] == 7)
{
format(string, sizeof(string), "(%d) %s - admin level 7", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
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,"----------------------------------------------------------------------------");
}
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,"----------------------------------------------------------------------------");
}
else if(count >= 2)
{
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;
}