06.07.2012, 11:57
Hello guys. May you please help me. Now the Admin On Duty system is like that:
When an admin is on duty, in /admins his name shows in yellow.
I would like to make it like that:
If the admin is Level 1 Moderator to show his name in green, instead of yellow. That is all.
Here is my /admins script:
When an admin is on duty, in /admins his name shows in yellow.
I would like to make it like that:
If the admin is Level 1 Moderator to show his name in green, instead of yellow. That is all.
Here is my /admins script:
Код:
if (strcmp(cmd, "/admins", true) == 0) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_WHITE,"__________________________________________________________"); SendClientMessage(playerid, COLOR_LIGHTYELLOW5," Admins Online: "); foreach (Player,i) { if(PlayerInfo[i][pHidden] == 0) { if(PlayerInfo[i][pAdmin] >= 1) { new admtext[64]; if(PlayerInfo[i][pAdmin] == 10) { admtext = "Lead Administrator"; } else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; } else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level 4 Senior Administrator"; } else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level 3 General Administrator"; } else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level 2 Administrator"; } else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level 1 Moderator"; } else if(PlayerInfo[i][pAdmin] == 11) { admtext = "Community Owner"; } else { admtext = "Level 1 Moderator"; } GetPlayerName(i, sendername, sizeof(sendername)); GiveNameSpace(sendername); if(PlayerInfo[i][pAdmin] == 12) { SendClientMessage(playerid, COLOR_LIGHTYELLOW5, "ONLINE: Admin [ID: 501]"); } else if(strcmp(PlayerInfo[i][pAdmName], "No admins online.", true) == 0) { if(GetPVarInt(i, "AdminDuty") == 0) { format(string, sizeof(string), "ONLINE: %s: %s [ID: %d]", admtext, sendername, i); SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string); } else if(GetPVarInt(i, "AdminDuty") == 1) { format(string, sizeof(string), "ONLINE: %s: %s [ID: %d] (On duty)", admtext, sendername, i); SendClientMessage(playerid, COLOR_YELLOW, string); } } else { if(GetPVarInt(i, "AdminDuty") == 0) { format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d]", admtext, PlayerInfo[i][pAdmName], sendername, i); SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string); } else if(GetPVarInt(i, "AdminDuty") == 1) { format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d] (On duty)", admtext, PlayerInfo[i][pAdmName], sendername, i); SendClientMessage(playerid, COLOR_YELLOW, string); } } } } } } SendClientMessage(playerid, COLOR_WHITE,"__________________________________________________________"); return 1; }