09.10.2011, 17:31
Hey, i just modified this command but when i do /admins every admin is shown as Community Director
Код:
if(strcmp(cmd, "/admins", true) == 0) // By Jay Cortrell { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] == 0) { SendClientMessage(playerid, COLOR_WHITE, "LS-RPG Administration Team"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] > 1 && !IsElite[i] && PlayerInfo[i][pStealthed] == 0) { //new plevel = PlayerInfo[playerid][pLevel]; //new hlevel = PlayerInfo[playerid][pHelper]; new alevel = PlayerInfo[playerid][pAdmin]; new stealthed = PlayerInfo[playerid][pStealthed]; GetPlayerName(i, giveplayer, sizeof(giveplayer)); if(alevel >= 1 && stealthed == 0) format(string, sizeof(string), "Moderator %s",giveplayer); if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "Executive Administrator %s",giveplayer); if(alevel >= 1337 && stealthed == 0) format(string, sizeof(string), "Co Director %s",giveplayer); if(alevel >= 99998 && stealthed == 0) format(string, sizeof(string), "Community Vice-Director %s",giveplayer); if(alevel >= 99999 && stealthed == 0) format(string, sizeof(string), "Community Director %s",giveplayer); //format(string, sizeof(string), "%d Admin: %s",PlayerInfo[i][pAdmin],giveplayer); SendClientMessage(playerid, COLOR_GREY, string); } } } } else if(PlayerInfo[playerid][pAdmin] > 1) { SendClientMessage(playerid, COLOR_WHITE, "LS-RPG Administration Team"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] > 0 && !IsElite[i]) { //new plevel = PlayerInfo[playerid][pLevel]; //new hlevel = PlayerInfo[playerid][pHelper]; new alevel = PlayerInfo[playerid][pAdmin]; new stealthed = PlayerInfo[playerid][pStealthed]; GetPlayerName(i, giveplayer, sizeof(giveplayer)); if(alevel >= 1 && stealthed == 0) format(string, sizeof(string), "Moderator %s", sendername); if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "Executive Administrator %s",giveplayer); if(alevel >= 1337 && stealthed == 0) format(string, sizeof(string), "Co Director %s",giveplayer); if(alevel >= 99998 && stealthed == 0) format(string, sizeof(string), "Assistant Director %s",giveplayer); if(alevel >= 99999 && stealthed == 0) format(string, sizeof(string), "Community Director %s",giveplayer); SendClientMessage(playerid, COLOR_GREY, string); //GetPlayerName(i, giveplayer, sizeof(giveplayer)); //format(string, sizeof(string), "%d Admin: %s",PlayerInfo[i][pAdmin],giveplayer); //SendClientMessage(playerid, COLOR_GREY, string); } } } } } return 1; }