24.06.2010, 12:48
hello,
i need a little help. something problem with dcmd_admin when i was compile. i have try everything but it doesnt work but i guess i need a help
.
heres the code:
plz help me if u guys a good guy
and i so sad
i need a little help. something problem with dcmd_admin when i was compile. i have try everything but it doesnt work but i guess i need a help
![Sad](images/smilies/sad.gif)
heres the code:
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new AdmRank[MAX_PLAYERS];
new count = 0;
new string[128];
new ChangeColor;
new aName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
SendClientMessage(playerid, LIGHTGREEN, " ");
SendClientMessage(playerid, LIGHTGREEN, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, LIGHTGREEN, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][AdminLevel] >= 1)
{
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(PlayerInfo[i][AdminLevel])
{
case 1:
{
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2:
{
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3:
{
AdmRank = "Administrator";
ChangeColor = Color_Master_Moderator;
}
case 4:
{
AdmRank = "Head Administrator";
ChangeColor = Color_Administrator;
}
case 5:
{
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
case 6:
{
AdmRank = "Administrator | Owner";
ChangeColor = ADMIN_RED;
}
}
}
format(string, 128, "%s | %s", aName, AdmRank);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid, ADMIN_RED,"No admin online in the list");
SendClientMessage(playerid, LIGHTGREEN, " _______________________________________");
return 1;
}
![Embarrassed](images/smilies/redface.gif)
![Cry](images/smilies/cry.gif)