20.03.2015, 10:20
I Type /admins It Just Show 1 Admin Online , Even The Server Have More Admins Online , But It Just Show 1 Admin Name , Someone Know How To Fix It? I Already Found Some Same Problem Threads , But Noone's /admins Same/Match With Me. If You Guys Know How To Fix It Please Help Me , Thanks !
Sorry About My Bad English.
Sorry About My Bad English.
PHP Code:
CMD:admins(playerid, params[])
{
new id;
new n[MAX_PLAYER_NAME];
new count = 0, string19[256];
GetPlayerName(id,n,sizeof(n));
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(pInfo[id][Adminlevel] == 1)
{
format(string19, sizeof(string19), "Trial Moderator : %s (%i)",n ,playerid);
count++;
}
if(pInfo[id][Adminlevel] == 2)
{
format(string19, sizeof(string19), "Moderator : %s (%i)",n ,playerid);
count++;
}
if(pInfo[id][Adminlevel] == 3)
{
format(string19, sizeof(string19), "Admin : %s (%i)",n ,playerid);
count++;
}
if(pInfo[id][Adminlevel] == 4)
{
format(string19, sizeof(string19), "Server Manager : %s (%i)",n ,playerid);
count++;
}
if(pInfo[id][Adminlevel] == 5)
{
format(string19, sizeof(string19), "Server Owner : %s (%i)",n ,playerid);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at Time!");
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
SendClientMessage(playerid, COLOR_GREEN, "");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, string19);
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
SendClientMessage(playerid, COLOR_GREEN, "");
}
return 1;
}