21.12.2015, 03:03
(
Последний раз редактировалось jlalt; 21.12.2015 в 08:27.
)
Quote:
try this
PHP код:
|
PHP код:
if(playerVariables[playerid][pAdminLevel] == 2)
Should be:
PHP код:
if(playerVariables[i][pAdminLevel] == 2)
PHP код:
CMD:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new count = 0, string[254], 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[i][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[i][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[i][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[i][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[i][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[i][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++;
}
}
}
}
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;
}