PDA

View Full Version : /admins bug?


ImprezBart
09/10/2011, 05:31 PM
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;
}

DaRkAnGeL[NBK]
09/10/2011, 05:38 PM
have you defined all you need to for example the admin ranks? i mean on LuxAdmin they have defines with rank 5 - Professional Admin ???

GrimR
09/10/2011, 05:47 PM
Isn't it also easier to use figures like levels 1-5 rather than stuff like 9998 lol.

ImprezBart
09/10/2011, 05:50 PM
Isn't it also easier to use figures like levels 1-5 rather than stuff like 9998 lol.
Lol yea, i didn't had the time to change it yet, it's a sarp edit.

ImprezBart
10/10/2011, 06:28 AM
bump