27.06.2012, 17:14
i set my friend to admin, and now we are both admins. After i type /admins it only show him in the list. This is the script for /admins
PHP код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
}
case 2: {
AdmRank = "Moderator";
}
case 3: {
AdmRank = "Master Moderator";
}
case 4: {
AdmRank = "Administrator";
}
case 5: {
AdmRank = "Master Administrator";
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "{99CCFF}Level: %d - {FFD119}%s (ID:%i) {99CCFF}| %s | {99CCFF}%s\n",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Admins Online" ,"{FFD119}No administrator online", "Close", "");
else
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Admins Online" ,string, "Close", "");
return 1;
}