25.01.2011, 18:03
(
Последний раз редактировалось Kingunit; 11.09.2011 в 20:21.
)
<fixed>
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "** Administrators **");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1338 || PlayerInfo[i][pTester] >= 1)
{
new admtext[64];
if(PlayerInfo[i][pAppearList] == 1)
{
if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Admin"; }
else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
else if(PlayerInfo[i][pTester] == 2) { admtext = "Senior Tester"; }
else if(PlayerInfo[i][pTester] == 1) { admtext = "Helper"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "%s %s (ID:%d) [Level: ] { Off Duty }", admtext, sendername, i);
SendClientMessage(playerid, COLOR_GREY, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "#COL_LIME %s %s (ID:%d) [Level: ] { On Duty }", admtext, sendername, i);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}
if(!strcmp(cmd, "/admins", true))
{
new admtext[32];
SendClientMessage(playerid, COLOR_LIGHTGREEN, "** Administrators **");
for(new i,g=GetMaxPlayers(); i < g; i++)
{
if(IsPlayerConnected(i))
{
if((1 <= PlayerInfo[i][pAdmin] <= 1338) || (PlayerInfo[i][pTester] >= 1))
{
if(PlayerInfo[i][pAppearList] == 1)
{
switch(PlayerInfo[i][pAdmin])
{
case 1338: admtext = "Owner";
case 1337: admtext = "Head Admin";
case 6: admtext = "Head Admin";
case 5: admtext = "Senior Admin";
case 4: admtext = "Senior Admin";
case 3: admtext = "Administrator";
case 2: admtext = "Administrator";
case 1: admtext = "Trial Admin";
default: {
switch(PlayerInfo[i][pTester])
{
case 3: admtext = "Lead Tester";
case 2: admtext = "Senior Tester";
case 1: admtext = "Helper";
default: admtext = "Unknown Rank";
}
}
}
}
GetPlayerName(i, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "%s %s (ID: %d) [Level: ] { Off Duty }", admtext, sendername, i);
SendClientMessage(playerid, COLOR_GREY, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), ""#COL_LIME" %s %s (ID: %d) [Level: ] { On Duty }", admtext, sendername, i);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
return 1;
}
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "** Administrators **");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1338 || PlayerInfo[i][pTester] >= 1)
{
new admtext[64];
if(PlayerInfo[i][pAppearList] == 1)
{
if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Admin"; }
else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
else if(PlayerInfo[i][pTester] == 2) { admtext = "Senior Tester"; }
else if(PlayerInfo[i][pTester] == 1) { admtext = "Helper"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1 && PlayerInfo[i][pTester] >= 1)
{
format(string, sizeof(string), "%s %s (ID: %d) [Level: %d ] (Off Duty)", admtext, sendername, i, PlayerInfo[i][pTester]);
SendClientMessage(playerid, COLOR_GREY, string);
}
else if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1 && PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "%s %s (ID: %d) [Level: %d ] (Off Duty)", admtext, sendername, i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_GREY, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1 && PlayerInfo[i][pTester] >= 1)
{
format(string, sizeof(string), ""#COL_LIME" %s %s (ID: %d) [Level: %d] (On Duty)", admtext, sendername, i, PlayerInfo[i][pTester]);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1 && PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), ""#COL_LIME" %s %s (ID: %d) [Level: %d] (On Duty)", admtext, sendername, i, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}
{
if (strcmp(cmd, "/admins", true) == 0)
if (strcmp(cmd, "/admins", true) == 0)
if (strcmp(cmd, "/admins", true) == 0)
{ // <-- this
// rest of code